relabel.m

来自「模式识别工具箱,希望对大家有用!」· M 代码 · 共 25 行

M
25
字号
function b = relabel(a,newlab)% B = relabel(A,newlab)%% Rename the labels in dataset A to newlab. Of course, the length of% newlab should be equal to the lablist of dataset A. The first class% from the lablist will get the first label in newlab. %% This function is useful when from a dataset A, several classes are% to be renamed to 'target' and the rest to outlier class.% Copyright: D. Tax, R.P.W. Duin, davidt@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlands[nlab,lablist,m,k,c,prob,featlist,imheight] = dataset(a);if (c~=size(newlab,1))  error('Number of new labels should be equal to number of classes');endb = dataset(+a,newlab(nlab),featlist,prob,newlab,imheight);return

⌨️ 快捷键说明

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