how to improve performance of a neural network
Afficher commentaires plus anciens
Hi every body
I am working on a code for retraining a NN to study its performance. My problem is that the performance of the network is low. Is there any thing I can do to improve its performance other than changing divideparam? Is there any problem with my code? Thank you very much for your help:
[
x,t]=bodyfat_dataset;
numtrain=20;
net=feedforwardnet(5);
ytr00=mean(t,2);
rng(0);
for i=1:numtrain
[NN{i} tr{i} y{i}]=train(net,x,t);
x_val{i}=x(:,tr{i}.valInd);
t_val{i}=t(tr{i}.valInd);
x_test{i}=x(:,tr{i}.testInd);
t_test{i}=t(tr{i}.testInd);
MSEval00(i)=mse(t_val{i}-ytr00);
MSEtst00(i)=mse(t_test{i}-ytr00);
y_val{i}=NN{i}(x_val{i});
y_tst{i}=NN{i}(x_test{i});
MSEval(i)=mse(net, t_val{i},y_val{i});
MSEtest(i)=mse(net, t_test{i},y_tst{i});
R2val(i)=1-MSEval(i)/ MSEval00(i);
R2tst(i)=1-MSEtest(i)/ MSEtst00(i);
end
1 commentaire
Meva
le 3 Jan 2014
Use cell structure before for loops. So that you can accelerate the performance and matlab will locate the values before loop.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!