prex1.m
来自「模式识别工具箱,本人毕业论文时用到的,希望对大家有用!」· M 代码 · 共 25 行
M
25 行
%PREX1 PRTOOLS example of classifiers and scatter plothelp prex1pause(1)echo onA = gendath(100,100); % Generate Highleyman's classes % Training set c (20 objects / class) % Test set d (80 objects / class)[C,D] = gendat(A,20); % Compute classifiersw1 = ldc(C); % linearw2 = qdc(C); % quadraticw3 = parzenc(C); % Parzenw4 = lmnc(C,3);% Neural Net % Compute and display errorsdisp([testd(D*w1),testd(D*w2),testd(D*w3),testd(D*w4)]); % Plot data and classifiersfigure(1);hold off;scatterd(A); drawnow;plotd(w1,'-'); drawnow;plotd(w2,'-.'); drawnow;plotd(w3,'--'); drawnow;plotd(w4,':'); drawnow;echo off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?