필터 지우기
필터 지우기

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