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.Typeis'holdout', thenidxspecifies the observations in the test set.If
c.Typeis'resubstitution', thenidxspecifies 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.Typeis'kfold', thenidx(:,j)specifies the observations in test seti(j).If
c.Typeis'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)

