test
Test indices for cross-validation
Description
returns the
test indices idx
= test(c
)idx
for a cvpartition
object c
of type 'holdout'
or 'resubstitution'
.
If
c.Type
is'holdout'
, thenidx
specifies the observations in the test set.If
c.Type
is'resubstitution'
, thenidx
specifies all observations.
returns the test indices for repetition idx
= test(c
,i
)i
of a cvpartition
object c
of type 'kfold'
or
'leaveout'
.
If
c.Type
is'kfold'
, thenidx
specifies the observations in thei
th test set or fold.If
c.Type
is'leaveout'
, thenidx
specifies the observation reserved for testing at repetitioni
.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2008a