필터 지우기
필터 지우기

need help with neural network

조회 수: 1 (최근 30일)
amro mahran
amro mahran 2012년 1월 23일
i'm working on a M file (script) to run neural network training for several time (10 times each) and i want to save the neural network results concerning MSE and Regression R coefficient for the Training and Validation and test data i want to know how to write a code to save the neural results??
  댓글 수: 1
amro mahran
amro mahran 2012년 1월 24일
I want to know the code of the function that calculate the MSE and Rcoefficient

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

채택된 답변

Léon
Léon 2012년 1월 24일
The solution to your problem should be a simple loop. Meaning that you put your relevant ANN code in that loop and save the output each time. Like the following
MSE_all = zeros(10,1); % preallocate space to the vector for all MSE values
R_all = zeros(10,1); % see above
for i = 10
% here goes your ANN training code
MSE_all(i) = MSE; % MSE means here the needed output by the ANN that should
% be stored
R_all(i) = R; % see above
end
  댓글 수: 1
amro mahran
amro mahran 2012년 1월 24일
Thanks for your help
but please i want to know the MSE function and the R function that is used

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

추가 답변 (2개)

Greg Heath
Greg Heath 2012년 1월 25일
Many examples of code that computes and saves Ntrials values of MSE and R^2 (coefficient of determination) can be obtained by searching the Newsgroup with the search words
heath Ntrials
Hope this helps
Greg
  댓글 수: 1
amro mahran
amro mahran 2012년 1월 25일
I tried to understand Newsgroup results but i' m a beginner
i'm using the Plotreg() function to determine the Regression R coefficient as follow
Y=sim(net,inputs0);
[~,~,r]=postreg(Y(tr.testInd),targets(tr.testInd))
is it right or not????
and for the MSE i use:
E=targets-Y;
mse_test=mse(E(tr.testInd));
Is it wright ???

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


Greg Heath
Greg Heath 2012년 1월 29일
If you have source access try this:
type mse
type postreg
Hope this helps.
Greg

Community Treasure Hunt

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

Start Hunting!

Translated by