Skip to content

Commit 637e38a

Browse files
committed
cleaned up
1 parent e11c6f3 commit 637e38a

File tree

5 files changed

+12
-90
lines changed

5 files changed

+12
-90
lines changed

sp_covMTL.asv

Lines changed: 0 additions & 87 deletions
This file was deleted.

sp_covMTL.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
% configure input kernel from input arguments
4343
if dg % kss
4444
Kx = feval(cov{:}, hyp((lmaxi+1):end), x);
45-
K = (M*Kf*M').*Kx;
45+
%K = (M*Kf*M').*Kx;
46+
K = (Mte*Kf*Mte').*Kx;
4647
K = diag(K);
4748
else
4849
if xeqz % K
@@ -54,8 +55,9 @@
5455
error('Covariance function not initialized for testing');
5556
end
5657
Kx = feval(cov{:}, hyp((lmaxi+1):end), x, z);
57-
K = (Mte*Kf*M').*Kx;
58-
K = K'; % transpose because gpml expects K(train,test)
58+
%K = (Mte*Kf*M').*Kx;
59+
%K = K'; % transpose because gpml expects K(train,test)
60+
K = (M*Kf*Mte').*Kx;
5961
end
6062
end
6163

sp_gp_cluster_batch.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
try opt.usecluster; catch, opt.usecluster = true; end
77
try opt.walltime; catch, opt.walltime = 300; end
88
try opt.memory; catch, opt.memory = 100*1024^2; end
9+
try opt.debug; catch, opt.debug = false; end
910

1011
D = size(X,2);
1112
T = size(Y,2); % number of tasks
@@ -50,6 +51,7 @@
5051
else % run sequentially
5152
nlmls = cell(Njobs,1); dnlmls = cell(Njobs,1); hyps = cell(Njobs,1);
5253
for n = 1:Njobs
54+
if opt.debug, fprintf('running job %d of %d...\n',n,Njobs'); end
5355
[nlmls{n},dnlmls{n},hyps{n}] = sp_gp_cluster_job(hypb{n},Xb{n},yb{n},optb{n});
5456
end
5557
end

sp_gp_cluster_job.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
%# function covGrid
1616
%# function infGrid
1717
%# function sp_infGrid
18+
%# function sp_covMTL
1819

1920
T = size(Y,2); % number of tasks
2021

@@ -31,6 +32,10 @@
3132
% opt.inf = @(varargin) infGrid(varargin{:},gopt);
3233
% end
3334

35+
if iscell(opt.cov) && any(regexp(func2str(opt.cov{1}),'sp_covMTL'))
36+
sp_covMTL('init', length(opt.hyp0.cov));
37+
end
38+
3439
Hyp = zeros(T,length(unwrap(hyp0)));
3540
NLML = zeros(T,1);
3641
DNLML = zeros(length(unwrap(hyp0)),T);

sp_gp_cluster_job_comp

7.68 KB
Binary file not shown.

0 commit comments

Comments
 (0)