cv

smile.validation.`package`.cv
object cv

Attributes

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

Members list

Value members

Concrete methods

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

Cross validation on a generic classifier. Cross-validation is a technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly used in settings where the goal is prediction, and one wants to estimate how accurately a predictive model will perform in practice. One round of cross-validation involves partitioning a sample of data into complementary subsets, performing the analysis on one subset (called the training set), and validating the analysis on the other subset (called the validation set or testing set). To reduce variability, multiple rounds of cross-validation are performed using different partitions, and the validation results are averaged over the rounds.

Cross validation on a generic classifier. Cross-validation is a technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly used in settings where the goal is prediction, and one wants to estimate how accurately a predictive model will perform in practice. One round of cross-validation involves partitioning a sample of data into complementary subsets, performing the analysis on one subset (called the training set), and validating the analysis on the other subset (called the validation set or testing set). To reduce variability, multiple rounds of cross-validation are performed using different partitions, and the validation results are averaged over the rounds.

Value parameters

k

k-fold cross validation.

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[M <: DataFrameClassifier](k: Int, formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => M): ClassificationValidations[M]

Cross validation on a data frame classifier.

Cross validation on a data frame classifier.

Value parameters

data

data samples.

formula

model formula.

k

k-fold cross validation.

trainer

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

Attributes

Returns

metric scores.

def regression[T <: AnyRef, M <: Regression[T]](k: Int, x: Array[T], y: Array[Double])(trainer: (Array[T], Array[Double]) => M): RegressionValidations[M]

Cross validation on a generic regression model.

Cross validation on a generic regression model.

Value parameters

k

k-fold cross validation.

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[M <: DataFrameRegression](k: Int, formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => M): RegressionValidations[M]

Cross validation on a data frame regression model.

Cross validation on a data frame regression model.

Value parameters

data

data samples.

formula

model formula.

k

k-fold cross validation.

trainer

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

Attributes

Returns

metric scores.