fitmodelfamily.knn: This function specifically handles fitting model families of...

Description Usage Arguments Value Examples

Description

This function specifically handles fitting model families of class knn. This handles everything that needs to be done when fitting a knn model family.

Usage

1
2
## S3 method for class 'knn'
fitmodelfamily(mod, hp_space, hp_strategy, calibration)

Arguments

mod

The modelfamily object.

hp_space

The hyperparameter space. This specifies the hyperparameters in the model family.

hp_strategy

The hyperparameter strategy. This specifies how the hyperparameters are selected when fitting the model family.

calibration

The calibration. This specifies how each model will be assessed when fitting the model family.

Value

The fitted knn model family. This is an object of classes "knn" and "modelfamily".

Examples

1
2
3
4
f_mod_fam <- fitmodelfamily(mod = new_knn_modelfamily(data = iris,design = Species ~ .),
hp_space = hp_space(vals = c(5,3,1), metric = c("euclidian")),
hp_strategy = "grid_search",
calibration = calibration(score = "accuracy",sampling = "bootstrap",reps = 10))

emilyklisa/mli documentation built on May 25, 2019, 5:21 p.m.