Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Neural network Help: Urgent
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!