[神经网络]Matlab神经网络原理4.5.2节 - 线性分类学习(工具箱)

版权声明:转载请说明Zhonglihao原创 https://blog.csdn.net/xeonmm1/article/details/83628440
clear;clc;
close all;

% 创建感知器(线性)
net = newp([-20,20;-20,20],1);

% 定义输入训练向量
P = [-9, 1, -12, -4, 0, 5;...
    15, -8, 4, 5, 11, 9];

% 期望输出
T = [0,1,0,0,0,1]; 

% 训练
net = train(net,P,T);

% 输入训练数据仿真验证
Y = sim(net, P);

Y

输出:

猜你喜欢

转载自blog.csdn.net/xeonmm1/article/details/83628440
今日推荐