Commit 789abc4f authored by Jordi's avatar Jordi
Browse files

Experiments using periodic LF kernel.

parent 21c1e90d
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -10,8 +10,11 @@ rng('default'), rng(0)
% modelType = 'sim';  % First order differential equation kernel (see simMeanCreate.m)
modelType = 'gg';   % Gaussian kernel (for convolution) and Gaussian covariance
% modelType = 'lmc';   % Linear model of corregionalization
% modelType = 'gg-periodic'; % A custom combo we created. We had to modify
                             % multigpCreate and multigpKernComposer to add this one.
% modelType = 'lmc-periodic'; % Another custom kernel

nlf = 2;                  % number of latent forces
nlf = 1;                  % number of latent forces
missing_rate = 0;         % set to 0.9 for the 90% missing rate experiment
gf_experiment = true;     % set to true for the gap-filling experiment
gf_range = [2009,2014];   % setup range (from 2019 to 2010-2014)
@@ -115,12 +118,14 @@ disp(Ytrain)
% Filename for model
mdate = datestr(now, 'yyyymmdd_hhMM');
switch lower(modelType)
    case {'sim', 'gg'}
    case {'sim', 'gg', 'gg-periodic'}
        fname = sprintf('SPARC_model_rev1_%s_%s_nlf_%d_mr_%0.2f_%s.mat', ...
            var, upper(modelType), nlf, missing_rate, mdate);
    case 'lmc'
    case {'lmc', 'lmc-periodic'}
        fname = sprintf('SPARC_model_rev1_%s_%s_nlf_%d_rank_%d_mr_%0.2f_%s.mat', ...
            var, upper(modelType), nlf, size(Ytrain,2), missing_rate, mdate);
    otherwise
        error(['Error unknown modelType ', modelType])
end
if gf_experiment
    % fname = strrep(fname, '_SPARC_', '_SPARC_gapfilling_');
@@ -144,10 +149,10 @@ options.kernType = modelType;
switch lower(modelType)
    case 'sim'
        options.nlf = nlf;
    case 'gg'
    case {'gg', 'gg-periodic'}
        % Options for GG Full Cov. Latent Force model
        options.nlf = nlf; % size(Ytrain, 2); % <= 3 latent forces in this case
    case 'lmc'
    case {'lmc', 'lmc-periodic'}
        % Options for linear model of coregionalization (LMC).
        % Here the number of effective latent forces are given by
        % nlf * rankCorregMatrix. As far as I understand, we should set