prex1mod.m
来自「模式识别工具箱,本人毕业论文时用到的,希望对大家有用!」· M 代码 · 共 37 行
M
37 行
%PREX1 PRTOOLS example of classifiers and scatter plothelp prex1pause(1)echo onA = gendatb(200,200); % Generate banana-shaped classes % Training set c (40 objects / class) % Test set d (160 objects / class)[C,D] = gendat(A,40);
echo off
num_hidden=input('Quanti neuroni nello strato hidden?');echo on
w1 = lmnc(C,num_hidden);% Neural Net % Compute and display errorsdisp([testd(C*w1)]);
% Plot data and classifiersfigure(1);
hold off;
scatterd(C,'.'); drawnow;% make scatter plot for right size
plotd(w1,'col'); drawnow;
hold on;
scatterd(C); drawnow;
disp([testd(D*w1)]);
% Plot data and classifiersfigure(2);
hold off;
scatterd(D,'.'); drawnow;% make scatter plot for right size
plotd(w1,'col'); drawnow;
hold on;
scatterd(D); drawnow;
echo off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?