git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
d0ee75c
Branches
Tags
master
SVMCrossVal.git
private
som_decode.m
X-SOM finished!
Christoph Budziszewski
commited
d0ee75c
at 2009-04-07 15:54:26
som_decode.m
Blame
History
Raw
function decode = som_decode(sM, svm_validation_data,svm_validation_label) % the number of hits in each map-unit. sValD = som_data_struct(svm_validation_data,'labels',num2str(svm_validation_label)); % h = som_hits(sM,sValD); bmu = som_bmus(sM, sValD, 'best'); correct = 0; nElements = length(svm_validation_label); nBMUs = length(bmu); for i = 1:nBMUs if isnan(bmu(i)) nElements = nElements - 1; elseif ( cell2mat(sM.labels(bmu(i))) == cell2mat(sValD.labels(i)) ) correct = correct + 1; end end decode = correct/nElements*100; end