setthres.m

来自「数据挖掘的工具箱,最新版的,希望对做这方面研究的人有用」· M 代码 · 共 43 行

M
43
字号
function out = setthres(w,thr)%SETTHRES Set the threshold for a one-class classifier%%     out = setthres(w,thr)%% The data of classifier w is copied to classifier out, only the% threshold value is changed to thr.%%     thr = setthres(w)%% The current threshold can be retrieved by supplying just the% classifier.%% DXD: There is a fundamental problem when the output of the classifier% is transformed after the computation, for instance by sigm.m or by% dist2dens. The threshold is applied to the original data, and not to% the classifier output. Setting the threshold by hand, according to the% classifier outputs will therefore NOT work! So therefore I'm sure if% this is very useful...% 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 Netherlandsif ~isocc(w)	error('setthres: I need a one-class classifier for this');end% Get the data:W = +w;% Return the threshold if that was the questionif nargin<2	out = W.threshold;	returnend% Otherwise change the threshold:W.threshold = thr;out = setdata(w,W);return

⌨️ 快捷键说明

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