classification
fun <T, M : Classifier<T>> classification(k: Int, x: Array<T>, y: IntArray, trainer: (Array<T>, IntArray) -> M): ClassificationValidations<M>(source)
Bootstrap validation on a generic classifier. The bootstrap is a general tool for assessing statistical accuracy. The basic idea is to randomly draw datasets with replacement from the training data, each sample the same size as the original training set.
Return
the error rates of each round.
Parameters
k
k-round bootstrap estimation.
x
data samples.
y
sample labels.
trainer
a lambda to return a classifier trained on the given data.
fun <M : DataFrameClassifier> classification(k: Int, formula: Formula, data: DataFrame, trainer: (Formula, DataFrame) -> M): ClassificationValidations<M>(source)
Bootstrap validation on a data frame classifier.
Return
the error rates of each round.
Parameters
k
k-round bootstrap estimation.
formula
model formula.
data
data samples.
trainer
a lambda to return a classifier trained on the given data.