-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_kernel_parameter.m
More file actions
34 lines (33 loc) · 1.11 KB
/
load_kernel_parameter.m
File metadata and controls
34 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%assemble a kenel parameter obj. from parameter list
function [ker_param, idx] = load_kernel_parameter(param_vec, d, type, start_idx)
l = exp(param_vec(start_idx+1:start_idx+d));
sigma = exp(param_vec(start_idx+d+1));
sigma0 = exp(param_vec(start_idx+d+2));
ker_param = [];
ker_param.type = type;
if strcmp(type, 'ard')
ker_param.l = l;
ker_param.sigma = sigma;
ker_param.sigma0 = sigma0;
ker_param.jitter = 1e-3;
%ker_param.jitter = 1e-10;
%ker_param.jitter = 1e-1;
%ker_param.jitter = 1e-4;
%ker_param.jitter = 1e-1;
%ker_param.jitter = 1e-3;
idx = start_idx + d + 2;
elseif strcmp(type, 'linear')
ker_param.l = l;
ker_param.sigma = sigma;
ker_param.sigma0 = sigma0;
ker_param.jitter = 1e-3;
idx = start_idx + d + 2;
elseif strcmp(type, 'ard-linear')
ker_param.alpha = exp(param_vec(start_idx+d+3));
ker_param.l = l;
ker_param.sigma = sigma;
ker_param.sigma0 = sigma0;
ker_param.jitter = 1e-1;
idx = start_idx + d + 3;
end
end