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 the repetitions specified in idx
= test(c
,i
)i
of a
cvpartition
object c
of type 'kfold'
or
'leaveout'
.
If
c.Type
is'kfold'
, thenidx(:,j)
specifies the observations in test seti(j)
.If
c.Type
is'leaveout'
, thenidx(:,j)
specifies the observation reserved for testing at repetitioni(j)
.
returns
the test indices for all repetitions of a idx
= test(c
,"all")cvpartition
object c
. Column j in
idx
indicates the observations in test set j for
an object of type 'kfold'
or 'leaveout'
. (since R2023b)