Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / MATLAB / July 2008



Tip: Looking for answers? Try searching our database.

"crossvalind" function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arthur Zheng - 15 Jul 2008 17:40 GMT
For the first example of "crossvalind" function in the
bioinformatics toolbox:
      % Create a 10-fold cross-validation to compute
classification error.
      load fisheriris
      indices = crossvalind('Kfold',species,10);
      cp = classperf(species);
      for i = 1:10
          test = (indices == i); train = ~test;
          class =
classify(meas(test,:),meas(train,:),species(train,:));
          classperf(cp,class,test)
      end

Is the output of cp.CorrectRate the average of the 10-fold
cross validation or only the CorrectRate of the last fold?
If it is the avearage of the ten folds, I suggest to add one
more property of cp, that is, "the variance of the
CorrectRate". Only Mean and variance together would make a
statistical significance
haibuo1981@gmail.com - 30 Jul 2008 07:45 GMT
Excuse me.
I can not reply your question because I'm a fresher of Matlab.
I tried to use crossvalind function, but I get a "Undefined command/
function 'crossvalind'" question.
My test code was a copy of Bioinformation Toolbox example:

load carbig
x = Displacement; y = Acceleration;
N = length(x);
sse = 0;
for i = 1:100
   [train,test] = crossvalind('LeaveMOut',N,1);
   yhat = polyval(polyfit(x(train),y(train),2),x(test));
   sse = sse + sum((yhat - y(test)).^2);
end
CVerr = sse / 100

My Matlab Version is 7.0.1, and I added bioinfo folders in my path.

Can you help me?
Any advice is welcoming...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.