views:

269

answers:

2

I would like to use 10-fold Cross-validation to evaluate a discretization in MATLAB. I should first consider the attributes and the class column.

+2  A: 

In Statistics Toolbox there is CROSSVAL function, which performs 10-fold cross validation by default. Check it out.

Another function CROSSVALIND exists in Bioinformatics Toolbox.

Also there is an open source Generic-CV tool: http://www.cs.technion.ac.il/~ronbeg/gcv/

yuk
Also, there's a handy cvparition class: http://www.mathworks.com/access/helpdesk/help/toolbox/stats/cvpartitionclass.html
kwatford
A: 

If you would rather write your own xval wrapper rather than using built-in functions, I often use randperm() to generate random orderings of my data, which you can then partition using a 90% (or your favorite value) cutoff point.