powered by
Prints the size of the training set the model memorised, and the number of neighbours used.
# S3 method for knn print(x, ...)
The model (object of class knn-class, created by KNN).
knn-class
KNN
Other parameters.
knn-class, KNN
require (datasets) data (iris) KNN (iris [, -5], iris [, 5])
Run the code above in your browser using DataLab