How to define x and y in this neural code ??

2 views (last 30 days)
Hi All
I have this code , but I literally do not know how to work with it , I am not yet familiar so much with neural networks . I'd please ask someone to explain me how to work with it :
clc clear clear all load x load y %normalizing data [xn_tr,xs_tr] = mapstd(x); [yn_tr,ys_tr] = mapstd(y); %% network net=newff(xn_tr,yn_tr,[7 7],{'tansig'},'traingda');%7 hidden tanh layer gradian descent adaptive net.trainParam.epochs =70; net.trainParam.lr = 0.05; net.trainParam.lr_inc = 1.05; %training network net.trainFcn='traingda'; [net,tr] = train(net,xn_tr,yn_tr); %randomizing initial value f weight matrix net = init(net); net.trainParam.show = NaN; u_t=mapstd('apply',x,xs_tr); %simulating output y_hat=sim(net,u_t); %plotting performance plotperform(tr) mse=mse(y-y_hat)
; ; ;;;;;;;;;;;;;;;;;;,;;;;;;;;;;;;;;;;;;;;;;;;;;;
I have an input vector as : [alfa , t, h, dp] and the output is a 6 by 6 matrix
I would like to know first , how to work with the code , to define these inputs , maybe they are the x and y in the code I don't know
and what is the precision of this case, I mean regarding to the ratio of the output parameters to input parameters
thank yo so much
  2 Comments
Greg Heath
Greg Heath on 9 Feb 2015
1. When you post code, always format it so that it can be run when cut and pasted into the command line.
2. Also include the performance on one of the MATLAB example datasets.
help nndatasets
doc nndatasets
NEWFF is obsolete. Type the command
ver
to see what version of MATLAB you have. Do you have FITNET (regression) and PATTERNNET (classification)? Type
help fitnet
doc fitnet
etc
farzad
farzad on 9 Feb 2015
Thank you Greg so much
I actually had problem and Did not know who to put that code correctly that everyone could copy it correctly , I just have attached the file as well
I won't use toolbox , I will use this code
yes matlab has FITNET and PATTERNET
so reading the nndatasets , will give me all the answers I got about this code ?
I also don't get notification email when I receive a comment ,do I need a correction in settings ?

Sign in to comment.

Accepted Answer

Greg Heath
Greg Heath on 10 Feb 2015
I don't recommend that code. Use FITNET or PATTERNNET.
The documentations and trivial examples are readily available using the help and doc commands.
Additional practice datasets are available via
help datasets
doc datasets
Less trivial examples are obtained via NEWSGROUP or ANSWER searches.
Since you are going to spend a nontrivial considerable amount of time, don't waste it
Greg

More Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!