Neural Networks change the Target

Hello. I have the next Question. After the training. How can I make the Neural Network works? Example: I train the NN, after that I make run the NN and have a result, but now I need change the Target and found a result whit the new Target without to train again?. Can yours make a example.??
Thank you
Andrew

 Respuesta aceptada

Greg Heath
Greg Heath el 16 de En. de 2016

0 votos

The basic assumption is that all data can be considered to be random samples from the same input/output probability distribution. Accordingly, once a net is designed it is expected to work well for data that looks like it could have come from the same distribution as the design (training + validation)data.
Otherwise the net has to be adjusted to accommodate a broader class of data or multiple nets designed to form an ensemble which either combines the results or chooses the best net.
Hope this helps.
Thank you for formally accepting my answer
Greg

5 comentarios

ANDRES CONSIGLIO
ANDRES CONSIGLIO el 17 de En. de 2016
Hello Greg, Thanks for your answer Have do you any example about that?? because I dont undestarnd How can I make this. I need change the target without modify the train neuron. I have many targets in different moments.It is possible??
Greg Heath
Greg Heath el 22 de En. de 2016
You will have to explain in terms of equations. Your words don't make any sense to me.
Sorry,
Greg
Greg... This is the code:
net = feedforwardnet(20); net.layers{1}.transferFcn = 'tansig'; net.layers{2}.transferFcn = 'purelin';
net.divideParam.trainRatio=.7; net.divideParam.valRatio=.15; net.divideParam.testRatio=.15; net.trainParam.max_fail = 500; net.trainParam.epochs = 500; net.trainParam.goal = .001;
i=0; fecha = datetime('now'); disp(fecha); Input = xlsread('Ensayo',1); Sample = xlsread('Ensayo',3); Target = xlsread('Ensayo',2);
for n = drange(1:1)
i=i+1;
disp(i);
[net,tr] = train(net,Input,Target);
end;
Y = net(Sample);
archivo = fopen('C:\Users\D3I6\Desktop\Neurona\Salida.txt','a');
fprintf(archivo,datestr(now, 'dd-mmm-yyyy\r\n'));
fprintf(archivo,'%3.0f\r\n',Y);
fclose(archivo);
fprintf('%3.0f\n',round(Y));
fecha = datetime('now');
disp(fecha);
net = feedforwardnet(20);
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'purelin';
net.divideParam.trainRatio=.7;
net.divideParam.valRatio=.15;
net.divideParam.testRatio=.15;
net.trainParam.max_fail = 500;
net.trainParam.epochs = 500;
net.trainParam.goal = .001;
i=0;
fecha = datetime('now');
disp(fecha);
Input = xlsread('Ensayo',1);
Sample = xlsread('Ensayo',3);
Target = xlsread('Ensayo',2);
for n = drange(1:1)
i=i+1;
disp(i);
[net,tr] = train(net,Input,Target);
end;
Y = net(Sample);
archivo = fopen('C:\Users\D3I6\Desktop\Neurona\Salida.txt','a');
fprintf(archivo,datestr(now, 'dd-mmm-yyyy\r\n'));
fprintf(archivo,'%3.0f\r\n',Y);
fclose(archivo);
fprintf('%3.0f\n',round(Y));
fecha = datetime('now');
disp(fecha);
Greg Heath
Greg Heath el 5 de Feb. de 2016
I see no calculation or display of error to prove that the design is acceptable.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 15 de En. de 2016

Comentada:

el 5 de Feb. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by