dualmaxsparsetargetalignment.m

来自「a function inside machine learning」· M 代码 · 共 14 行

M
14
字号
function b = dualMaxSparseTargetAlignment(K, Kj, Y, Yj)
%A function to compute the maximum sparse target alignment vector between matrix
%K and vector y
%We just use the example with the highest target alingment
numExamples = size(Kj, 1); 
columnIndices = (1:numExamples)'; 

[alignments, bs] = sparseAlignments(K, Kj, Y, Yj, columnIndices); 

[maxAlignment, i] = max(alignments);
b = zeros(numExamples, 1); 
b(i) = bs(i);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?