prex_mcplot.m

来自「这是我找到的一个模式识别工具箱」· M 代码 · 共 29 行

M
29
字号
%PREX-MCPLOT   PRTools example on a multi-class classifier plothelp prex_mcplotecho ongridsize(100)            % Generate twice normally distributed 2-class data in 2Da = +gendath([20,20]);    % data onlyb = +gendath([20,20]);    % data only            % Shift the second data by a vector [5,5]            % and combine it with the first dataset in to AA = [a; b+5];                  % Generate 4-class labelslab = genlab([20 20 20 20],[1 2 3 4]');            % Construct a 4-class dataset AA = dataset(A,lab);    A = setname(A,'4-class dataset')            % Plot this 4-class datasetfigure            % Make a scatter-plot of the right sizescatterd(A,'.'); drawnow;             % Compute normal densities based quadratic classifier  w = qdc(A);                 % Plot filled classification regionsplotc(w,'col'); drawnow;   hold on;            % Redraw the scatter-plotscatterd(A);     hold offecho off

⌨️ 快捷键说明

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