regression

fun <T, M : Regression<T>> regression(k: Int, x: Array<T>, y: DoubleArray, trainer: (Array<T>, DoubleArray) -> M): RegressionValidations<M>(source)

Bootstrap validation on a generic regression model.

Return

the root mean squared error of each round.

Parameters

k

k-round bootstrap estimation.

x

data samples.

y

response variable.

trainer

a lambda to return a regression model trained on the given data.


fun <M : DataFrameRegression> regression(k: Int, formula: Formula, data: DataFrame, trainer: (Formula, DataFrame) -> M): RegressionValidations<M>(source)

Bootstrap validation on a data frame regression model.

Return

the root mean squared error of each round.

Parameters

k

k-round bootstrap estimation.

formula

model formula.

data

data samples.

trainer

a lambda to return a regression model trained on the given data.