get folds indexes
Performs k-fold cross-validation (KF-CV). KF-CV separates the data-set into k random equally sized partitions, and uses each as a validation set, with all other partitions used in the training set. Observations left over from if k does not divide the number of observations are left out of the cross-validation process.
(function)
The classifier's to use for the cross validation. Expect ml-classifier api.
(Array)
The features for all samples of the data-set
(Array)
The classification class of all samples of the data-set
(object)
The classifier options with which the classifier should be instantiated.
(number)
The number of partitions to create
ConfusionMatrix
:
The cross-validation confusion matrix
Performs a leave-one-out cross-validation (LOO-CV) of the given samples. In LOO-CV, 1 observation is used as the validation set while the rest is used as the training set. This is repeated once for each observation. LOO-CV is a special case of LPO-CV. @see leavePout
(function)
The classifier's constructor to use for the cross validation. Expect ml-classifier
api.
(Array)
The features for all samples of the data-set
(Array)
The classification class of all samples of the data-set
(object)
The classifier options with which the classifier should be instantiated.
ConfusionMatrix
:
The cross-validation confusion matrix
Performs a leave-p-out cross-validation (LPO-CV) of the given samples. In LPO-CV, p observations are used as the validation set while the rest is used as the training set. This is repeated as many times as there are possible ways to combine p observations from the set (unordered without replacement). Be aware that for relatively small data-set size this can require a very large number of training and testing to do!
(function)
The classifier's constructor to use for the cross validation. Expect ml-classifier
api.
(Array)
The features for all samples of the data-set
(Array)
The classification class of all samples of the data-set
(object)
The classifier options with which the classifier should be instantiated.
(number)
The size of the validation sub-samples' set
ConfusionMatrix
:
The cross-validation confusion matrix
A function to sample a dataset maintaining classes equilibrated
(Array)
an array containing class or group information
(Number)
a fraction of the class to sample
Object
:
an object with indexes