loocv

smile.validation.`package`.loocv
object loocv

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
loocv.type

Members list

Value members

Concrete methods

def classification[T <: AnyRef](x: Array[T], y: Array[Int])(trainer: (Array[T], Array[Int]) => Classifier[T]): ClassificationMetrics

Leave-one-out cross validation on a generic classifier. LOOCV uses a single observation from the original sample as the validation data, and the remaining observations as the training data. This is repeated such that each observation in the sample is used once as the validation data. This is the same as a K-fold cross-validation with K being equal to the number of observations in the original sample. Leave-one-out cross-validation is usually very expensive from a computational point of view because of the large number of times the training process is repeated.

Leave-one-out cross validation on a generic classifier. LOOCV uses a single observation from the original sample as the validation data, and the remaining observations as the training data. This is repeated such that each observation in the sample is used once as the validation data. This is the same as a K-fold cross-validation with K being equal to the number of observations in the original sample. Leave-one-out cross-validation is usually very expensive from a computational point of view because of the large number of times the training process is repeated.

Value parameters

trainer

a code block to return a classifier trained on the given data.

x

data samples.

y

sample labels.

Attributes

Returns

metric scores.

def classification(formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => DataFrameClassifier): ClassificationMetrics

Leave-one-out cross validation on a data frame classifier.

Leave-one-out cross validation on a data frame classifier.

Value parameters

data

data samples.

formula

model formula.

trainer

a code block to return a classifier trained on the given data.

Attributes

Returns

metric scores.

def regression[T <: AnyRef](x: Array[T], y: Array[Double])(trainer: (Array[T], Array[Double]) => Regression[T]): RegressionMetrics

Leave-one-out cross validation on a generic regression model.

Leave-one-out cross validation on a generic regression model.

Value parameters

trainer

a code block to return a regression model trained on the given data.

x

data samples.

y

response variable.

Attributes

Returns

metric scores.

def regression(formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => DataFrameRegression): RegressionMetrics

Leave-one-out cross validation on a data frame regression model.

Leave-one-out cross validation on a data frame regression model.

Value parameters

data

data samples.

formula

model formula.

trainer

a code block to return a regression model trained on the given data.

Attributes

Returns

metric scores.