plot.knn_cv: plot function for knn_cv

View source: R/knn_cv.r

plot.knn_cvR Documentation

plot function for knn_cv

Description

plots the misclassification error rate versus number of neighbors based on call to knn_cv

Usage

## S3 method for class 'knn_cv'
plot(x, ...)

Arguments

x

object of class knn_cv.

...

additional arguments. currently not used.

Details

The list x is assumed to have attributes kvec and error representing the number of neighbors and the corresponding misclassification rate, respectively.

Value

No return value, called for side effects of creating plot.

Author(s)

John Kloke

References

Hastie, T., Tibshiani, R., and Friedman, J. (2017), The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition, New York: Springer.

James, G., Witten, D., Hastie, T., and Tibshirani, R. (2013), An Introduction to Statistical Learning with Applications in R, New York: Springer.

Venables, W. N. and Ripley, B. D. (2002) _Modern Applied Statistics with S._ Fourth edition. Springer.

See Also

knn_cv


kloke/npsm documentation built on Nov. 11, 2023, 4:27 a.m.