Simple k Nearest Neighbours Classification
Classifies new observations using the sknn learned by
the sknn
-function.
## S3 method for class 'sknn' predict(object, newdata,...)
object |
Object of class |
newdata |
Data frame (or matrix) of cases to be classified. |
... |
... |
A list with elements ‘class
’ and ‘posterior
’.
Karsten Luebke, karsten.luebke@fom.de
data(iris) x <- sknn(Species ~ ., data = iris) predict(x, iris) x <- sknn(Species ~ ., gamma = 10, kn = 10, data = iris) predict(x, iris)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.