bootstrap

smile.validation.`package`.bootstrap
object bootstrap

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
bootstrap.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]

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. This is done many times (say k = 100), producing k bootstrap datasets. Then we refit the model to each of the bootstrap datasets and examine the behavior of the fits over the k replications.

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. This is done many times (say k = 100), producing k bootstrap datasets. Then we refit the model to each of the bootstrap datasets and examine the behavior of the fits over the k replications.

Value parameters

k

k-round bootstrap estimation.

trainer

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

x

data samples.

y

sample labels.

Attributes

Returns

the error rates of each round.

def classification[M <: DataFrameClassifier](k: Int, formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => M): ClassificationValidations[M]

Bootstrap validation on a data frame classifier.

Bootstrap validation on a data frame classifier.

Value parameters

data

data samples.

k

k-round bootstrap estimation.

trainer

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

Attributes

Returns

the error rates of each round.

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

Bootstrap validation on a generic regression model.

Bootstrap validation on a generic regression model.

Value parameters

k

k-round bootstrap estimation.

trainer

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

x

data samples.

y

response variable.

Attributes

Returns

the root mean squared error of each round.

def regression[M <: DataFrameRegression](k: Int, formula: Formula, data: DataFrame)(trainer: (Formula, DataFrame) => M): RegressionValidations[M]

Bootstrap validation on a data frame regression model.

Bootstrap validation on a data frame regression model.

Value parameters

data

data samples.

k

k-round bootstrap estimation.

trainer

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

Attributes

Returns

the root mean squared error of each round.