"Maria " <
maria....@luukku.com> wrote in message
news:jqpj8b$7kn$1...@newscl01ah.mathworks.com...
If you look at the doc or help for cvpartition, you will see that it accepts
two signatures:
c = cvpartition(n,'kfold',k)
c = cvpartition(group,'kfold',k)
The first syntax is to partition *without* stratification by group. The
second syntax is to partition *with* stratification by group. If you need an
equal number of observations per group, use the 2nd syntax.
The answer to your second question is in your post. You said "divides the
observations into k disjoint subsamples". 'Disjoint" means that each
observation is used for one fold only. -Ilya