Neural Network and Machine learning

조회 수: 1 (최근 30일)
ANDRES CONSIGLIO
ANDRES CONSIGLIO 2016년 1월 20일
편집: Greg Heath 2016년 1월 22일
Hello.
I have this 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('Datos',4);
Target = xlsread('Datos',5);
Sample = xlsread('Datos',6);
for n = drange(1:4)
i=i+1;
disp(i);
net=train(net,Input,Target);
[net,tr] = train(net,Input,Target);
end;
Y = net(Sample); Output = net(Target); y = net(Input); plotconfusion(Target,Output); Sample1 = sort(Sample,'descend'); plot(Sample1,'DisplayName','Modelo');hold on;plot(Sample,'DisplayName','Real');figure() [r,m,b] = regression(Output,y); plotregression(Target,Output); perf = perform(net,y,Target);
plotperform(tr); archivo = fopen('C:\Users\Pablo\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);
After traing and use the sim() I get a result, but How can a I make change a target using the same trained neuron ?? or a machine learning. Please some example to see ... Thank.

채택된 답변

Greg Heath
Greg Heath 2016년 1월 21일
편집: Greg Heath 2016년 1월 21일
1. Please format your code
2. Delete the 1st equation
net = train(net,Input,Target);
[net,tr] = train(net,Input,Target);
3.The following is an error.(It doesn't make sense)
Output = net(Target)
Hope this helps.
Thank you for formally accepting my answer
Greg
  댓글 수: 2
ANDRES CONSIGLIO
ANDRES CONSIGLIO 2016년 1월 21일
편집: ANDRES CONSIGLIO 2016년 1월 21일
Hello Greg. Thank for your Answer, but I understand how can put a diffrent Target into the train NN. Can Do you make any example?? Thank again.
Greg Heath
Greg Heath 2016년 1월 22일
편집: Greg Heath 2016년 1월 22일
A different target requires a different design.
The design is only valid for inputs in a restricted space.
For a different input in that space corresponding to a different target,
output = net(input);
If you know the target you can calculate the error.
Hope this helps.
Greg

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by