plot.knn_cv {npsm}R 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


[Package npsm version 2.0.0 Index]