f



How to create and train a perceptron

Hy,
I've to create a perceptron and I tried with the followind code:

clc
clear all
close all
dati=xlsread('datilab5.xls','Sheet1','B2:AH2049');

p(1,:)=min(dati);
p(2,:)=max(dati);
p=p(:,1:32);
net=newp(p',32,'hardlim','learnp');
net.trainParam.epochs = 20;

P=dati(:,1:32);
T=dati(:,33);
net = train(net, P',T')


In the excel datasheet I've the data from the column 1 to 32 (these are 
the features) in 2048 rows and the check class for supervising in the 
column 33.

The fault is in the target matrix dimension but i donn't understand the 
problem source.
I read the newp help and S is the numeber neurons but this is for the 
number of input layer or number of output layer?
Thank you to everybody for suggests.
Bye


0
12/2/2008 8:54:14 AM
comp.soft-sys.matlab 210422 articles. 11 followers. lunamoonmoon (258) is leader. Post Follow

0 Replies
234 Views

Similar Articles

[PageSpeed] 49

Reply: