フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Neural network Help: Urgent

1 回表示 (過去 30 日間)
Ahmed
Ahmed 2012 年 1 月 22 日
Dear Colleagues
Hope my email finds you well. I made a code using m-file in Matlab to obtain the optimum number of hidden neuron. So that I made a loop to try the performance (MSE) from the number of inputs to the twice number of inputs.
My problem is that the program calculate save the results of last iteration only in work space. So that I need advice about:
1. How to save the results after each iterations in the work space.
2. How to plot the performance graphs after each iteration separately.
3. How to plot the total number of hidden neurons (i) versus MSE in each iterations and let the program calculate the best number of hidden neuron.
[I N]=size(input);
for i=I:I*2
network=newff(input,target,i,{'logsig' 'purelin'},'trainlm');
view(network)
% NN training
network=init(network);
[network,tr]=train(network,input,target);
% Testing the Neural Network
y=sim(network,input);
residual=target-y;
figure
plot(residual)
title('Prediction Errors');
xlabel('Pattern Sequence');
ylabel('Residuals');
% NN weight and bias matrices
Layer1_Weights=network.iw{1};
Layer1_Bias=network.b{1};
Layer2_Weights=network.lw{2};
Layer2_Bias=network.b{2};
Layer1_Weights;
Layer1_Bias;
Layer2_Weights;
Layer2_Bias;
end

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by