📄 dd_ex4.m
字号:
% DD_EX4%% This should show the use of consistent_occ, for the optimization% of complexity parameters of one-class classifiers. This function% can be applied to all one-class classifiers in the toolbox, for% instance:% function range% knndd 1:10% svdd scale_range% lpdd scale_range% parzen_dd scale_range (here the automatic optimization works% also quite satisfactory)% Generate some data:nrx = 100;x = target_class(gendatb([nrx nrx]),'1');% Define the error on the target classfracrej = 0.2;% The knndd:% Define a useful range of scales:range = 1:10;% Optimize the k in the knndd using the consistency:w_knndd = consistent_occ(x,'knndd',fracrej,range);% The LPDD:% Define a useful range of scales:range = scale_range(x);% Optimize the scale in the LPDD using the consistency:w_lpdd = consistent_occ(x,'lpdd',fracrej,range);% Plot the results:scatterd(x);plotc(w_knndd);plotc(w_lpdd,'r');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -