?? dualmaxsparsevariance2.m.svn-base
字號:
function b = dualMaxSparseVariance2(K, Kj, Y, Yj, kernelCols)
%A function to compute the maximum sparse variance vector between matrix
%K and vector y
%We just use the example with the highest absolute variance and select from
%only a few columns of the kernel matrix
if (nargin ~= 5)
fprintf('%s\n', help(sprintf('%s', mfilename)));
error('Incorrect number of inputs - see above usage instructions.');
end
numExamples = size(Kj, 1);
columnIndices = (1:numExamples)';
[variances, bs] = sparseVariances(K, Kj, Y, Yj, columnIndices);
permutationVector = randperm(numExamples);
colIndices = permutationVector(1:kernelCols);
variances2 = variances(colIndices);
[maxVariance, i] = max(variances2);
b = zeros(numExamples, 1);
b(colIndices(i)) = bs(colIndices(i));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -