Effacer les filtres
Effacer les filtres

How to "retrain" Neural Networks?

1 vue (au cours des 30 derniers jours)
Daniel
Daniel le 22 Nov 2011
Hi,
I have an algorithm to forecast time series relying on observed values of the time series in the past. The algorithm is based on several so called experts and based on their performance in the past a convex combination of the experts is used for final prediction.
In the case of Neural Networks, one of the parameters of the experts is the amount of neurons h used. Simplified I have a loop
for i=1:n
net = newfit(inputs(:,1:i),targets(1:i),h);
net.divideParam.trainRatio=75/100;
net.divideParam.valRatio=25/100;
net.trainParam.showWindow=false;
net=train(net,inputs(:,1:i),targets(1:i));
estimate=sim(net,x_eval);
...
end
So in every iteration the network trained only difers a little bit, because only one pair of (inputs,targets) is added for training, the rest remains unchanged. Is there a way to use this fact and accelerate the whole process, like "retraining"?
Thanks
Daniel

Réponses (1)

Greg Heath
Greg Heath le 23 Nov 2011
Everytime you call newfit you create a new network with random initial weights. Therefore, try something like
net = newfit(inputs,targets,h);
net.divideParam.trainRatio=75/100;
net.divideParam.valRatio=25/100;
net.trainParam.showWindow=false;
for i=1:n
net = train(net,inputs(:,1:i),targets(1:i));
estimate=sim(net,x_eval);
...
end
Hope this helps.
Greg
  1 commentaire
Daniel
Daniel le 23 Nov 2011
Hi Greg,
this should at least save some time for initiating, thank you. But the training process itself probably consumes a lot more time..
Daniel

Connectez-vous pour commenter.

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by