How can I use Neural Networks to create several networks instead of creating one by one manually?
Show older comments
Hey,
I would like to create several neural networks models and estimations using for each one of them 2 variables as inputs and 1 variable as output. For a single stock I would use the NNtool to first construct the model and then do the estimation. What I would like to know is how could I do this for all the stocks (30 stocks and for each one of them I would like to create a nn estimation) in an automatic way without having to run the wizard for each one of them.
Thanks you for your support,
Best regards,
Sarah
Accepted Answer
More Answers (1)
Apdullah YAYIK
on 27 Apr 2014
1 vote
Of course you can create several neural networks and control their variables (transfer functions, hidden layers, neuron numbers of training algorithms)for your estimation or classification problems. For example ---First ANN--- nn=10;mm=10;pp=10; %%Neuron Numbers net1=newfit(minmax(target{1,1}),[nn,mm,pp,1],{'radbas','purelin','radbas','purelin','radbas'},'trainbr'); net1.trainparam.min_grad=0; net1.trainparam.mu_max=1.e+10; net1.trainParam.epochs=20; net1=train(net1,target{1,1},acik_bin_reshaped{1,1}); ---Second ANN--- net2=newfit(minmax(target{1,2}),[nn,mm,pp,1],{'radbas','purelin','radbas','purelin','radbas'},'traingda'); net2.trainparam.min_grad=0; net2.trainparam.mu_max=1.e+10; net2.trainParam.epochs=20; net2=train(net2,target{1,2},acik_bin_reshaped{1,2}); ---Third ANN--- %%%%%%%%%%%%%%%%%%%%%3.Boyut NN%%%%%%%%%%%%%%%%%%%%% net3=newfit(minmax(target{1,3}),[nn,mm,pp,1],{'radbas','purelin','radbas','purelin','radbas'},'traingda'); net3.trainparam.min_grad=0; net3.trainparam.mu_max=1.e+10; net3.trainParam.epochs=20; net3=train(net3,target{1,3},acik_bin_reshaped{1,3});
Then, you can simulate each of them independently.
output1=sim(net1,target{1,1}); output2=sim(net2,target{1,2}); output3=sim(net3,target{1,3});
Categories
Find more on Deep Learning Toolbox 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!