forked from lawrennd/gp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgpDisplay.m
84 lines (77 loc) · 2.18 KB
/
gpDisplay.m
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
function gpDisplay(model, spaceNum)
% GPDISPLAY Display a Gaussian process model.
% FORMAT
% DESC displays in human readable form the contents of the GP
% model.
% ARG model : the model structure to be displaced.
% ARG spaceNum : number of spaces to place before displaying model
% structure.
%
% SEEALSO : gpCreate, modelDisplay.
%
% COPYRIGHT : Neil D. Lawrence, 2005, 2006, 2009
% GP
if nargin > 1
spacing = repmat(32, 1, spaceNum);
else
spaceNum = 0;
spacing = [];
end
spacing = char(spacing);
fprintf(spacing);
fprintf('Gaussian process model:\n')
fprintf(spacing);
fprintf(' Number of data points: %d\n', model.N);
fprintf(spacing);
fprintf(' Input dimension: %d\n', model.q);
fprintf(spacing);
fprintf(' Number of processes: %d\n', model.d);
if isfield(model, 'beta') & ~isempty(model.beta)
fprintf(spacing);
fprintf(' beta: %2.4f\n', model.beta)
end
if any(model.scale~=1)
fprintf(spacing);
fprintf(' Output scales:\n');
for i = 1:length(model.scale)
fprintf(spacing);
fprintf(' Output scale %d: %2.4f\n', i, model.scale(i));
end
end
if any(model.bias~=0)
fprintf(spacing);
fprintf(' Output biases:\n');
for i = 1:length(model.bias)
fprintf(spacing);
fprintf(' Output bias %d: %2.4f\n', i, model.bias(i));
end
end
switch model.approx
case 'ftc'
fprintf(spacing);
fprintf(' No sparse approximation.\n')
case 'dtc'
fprintf(spacing);
fprintf('Deterministic training conditional approximation.\n')
fprintf(' Number of inducing variables: %d\n', model.k)
case 'dtcvar'
fprintf(spacing);
fprintf('Sparse variational approximation.\n')
fprintf(' Number of inducing variables: %d\n', model.k)
case 'fitc'
fprintf(spacing);
fprintf('Fully independent training conditional approximation.\n')
fprintf(' Number of inducing variables: %d\n', model.k)
case 'fitc'
fprintf(spacing);
fprintf('Partially independent training conditional approximation.\n')
fprintf(' Number of inducing variables: %d\n', model.k)
end
fprintf(spacing);
fprintf(' Kernel:\n')
kernDisplay(model.kern, 4+spaceNum);
if isfield(model, 'noise') & ~isempty(model.noise)
fprintf(spacing);
fprintf(' Noise model:\n')
noiseDisplay(model.noise, 4+spaceNum);
end