Description Usage Arguments Value Examples
This function specifically handles fitting knn models. This handles everything that needs to be done when fitting a knn model.
1 2 | ## S3 method for class 'knn'
fitmodel(mod, k = -1, metric = "euclidian")
|
mod |
The knn model. |
k |
The k value for the model. The default in this case in -1 which in the function is changed to the calculation of the square root of the number of rows of data. |
metric |
The metric. The default is set to "euclidian". |
The fitted knn model. This is an object of classes "knn" and "model".
1 | fitmodel(mod = new_knn_model(data=iris, design = Species ~ .), k=3, metric="euclidian")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.