testing.m
来自「基于半监督的核主元分析matlab代码」· M 代码 · 共 25 行
M
25 行
function d = testing( a, d) K = calc( a.child, d, a.dat)'; %% between old examples and test examples if 0 [Kt] = calc(a.child,a.dat,a.dat); %%restore old uncentered kernel else Kt=a.Kt; end if a.center_data %center the test examples in feature space [n,m] = size(K); Om = ones(m)/m; On = ones(n,m)/m; I = eye( m); %brackets are for better numerical condition K = ((K - On*Kt)*(I-Om))'; test_features = K'*a.e_vec;else test_features = K*a.e_vec;end d=set_x(d,test_features); d.name=[get_name(d) ' -> ' get_name(a)];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?