Description Usage Arguments Value Examples
This function specifically handles fitting model families of class knn. This handles everything that needs to be done when fitting a knn model family.
1 2 | ## S3 method for class 'knn'
fitmodelfamily(mod, hp_space, hp_strategy, calibration)
|
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. |
The fitted knn model family. This is an object of classes "knn" and "modelfamily".
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.