Learn R Programming

fdm2id (version 1.0.1)

print.knn: Print a K-nearest-neighbours model

Description

Prints the size of the training set the model memorised, and the number of neighbours used.

Usage

# S3 method for knn
print(x, ...)

Arguments

x

The model (object of class knn-class, created by KNN).

...

Other parameters.

See Also

knn-class, KNN

Examples

Run this code
require (datasets)
data (iris)
KNN (iris [, -5], iris [, 5])

Run the code above in your browser using DataLab