plot the performance of a neural network

Hi
Look at this code please:
P = [ -1 -1 2 2 ;0 5 0 5];
T = [-1 -1 1 1];
net = newff( minmax(P),[3 1],{'tansig','purelin'}, 'traingd']; [net, tr]= train(net, P, T);
a = sim(net, P);
After Running it, when i click to see the peformance (MSE versus epochs) it shows a plot comparing train , test and validation data. How can i chande train and test data and not having validation?
thanks in advance

 Respuesta aceptada

Greg Heath
Greg Heath el 22 de Dic. de 2012

0 votos

Replace 'traingd'] with 'traingd')
I only get the training curve.
Are you sure you are using that obsolete version of newff instead of the more recent obsolete version that uses the data division default?
net = newff( P,T,3,{'tansig','purelin'}, 'traingd');
I get 3 curves using this one.
To better understand data division go to the nnet documentation
doc nnet
and search on
dividefcn
With only 4 points you cannot afford to divide the data. The default yields 2 training points and 1 point each for validataion and testing.
Why don't you go to the nnet documentation and find the list of sample data sets. Then choose one for your purposes so that you can experiment with how to control the data division?
[ P, T] = simplefit_dataset;
Then divide the data any way you want and check the results.
Hope this helps.
Thank you for formally accepting my answer
Greg

1 comentario

Greg Heath
Greg Heath el 22 de Dic. de 2012
If you do not want validation and test data, either of these should work.
net.divideFcn = '';
or
net.divideFcn = dividetrain;

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Downloads en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 20 de Dic. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by