Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

design a Neural Network in matlab

Status
Not open for further replies.

m-tlb

Newbie level 6
Joined
Aug 23, 2011
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,366
Hi all


i am very new in neural network,i want to create a net that input is [12 310] and output is [4 310],it has two layer.ther is my code:

net=newff(P,T,12,{'tansig','tansig','hardlim'},'trainlm');
net.trainParam.show = 5;
net.trainParam.epochs = 300;
net.trainParam.goal = 1e-8;
[net,tr]=train(net,P,T);
a = sim(net,P)

but my net doesn't a good performance !!? i don't know what i should change!!???
my output is in form of binary code.i can send my data if you can help me.



please help meeeeeeeeeeee..........
 

Sorry what is [12 310] and [4 310], input output range?
What about your input data?
You may need normalization prior applying them to NN.
 
  • Like
Reactions: m-tlb

    m-tlb

    Points: 2
    Helpful Answer Positive Rating
hi

input matrix has 12 rows and 310 columns,output matrix has 4 rows and 310 columns.
How can normilization my data?why should i normalize data before NN?
 

Hi;
Please have a check prestd and trastd functions in MATLAB.
Normaliziton is necessary for input vectors whose each element comes from different domain.
ie you have the age, height and weight information to do some classification. But as you know all have different ranges and mean values. If you directly use them to train your network, one of those parameters may affect the network learning in a bad manner.
you can have a look at here: ftp://ftp.sas.com/pub/neural/FAQ2.html#A_std_in
 

Hi all

i am new in neural network.i want to make a BP net in matlab.this is my code:
[pn,ps] = mapstd(P);
[tn,ts] = mapstd(T);
net=newff(pn,tn,[12,24],{'tansig','tansig','purelin'},'trainlm');
net.trainParam.epochs=3000;
net.trainParam.goal=1e-8;
net.trainParam.max_fail=5;
net.trainParam.mem_reduc=1;
net.trainParam.min_grad=1e-10;
net.trainParam.mu=0.001;
net.trainParam.mu_dec=0.1;
net.trainParam.mu_inc=10;
net.trainParam.mu_max=1e10;
net.trainParam.show=2;
net.trainParam.showCommandLine=1;
net.trainParam.showWindow=1;
net.trainParam.time=inf;
[net,tr]=train(net,pn,tn);
an = sim(net,pn);
a = mapstd('reverse',an,ts);

my output(T) is binary code.but this net does't has a good performance !!! I don't know what i should change.in addition i don't underestand the meaning of "net.trainParam.max_fail" .please help me. i can send my data if you need.:sad:

tanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top