powered by
Classifies new observations using the sknn learned by the sknn-function.
sknn
# S3 method for sknn predict(object, newdata,...)
A list with elements ‘class’ and ‘posterior’.
class
posterior
Object of class sknn.
Data frame (or matrix) of cases to be classified.
...
Karsten Luebke, karsten.luebke@fom.de
sknn, knn
knn
data(iris) x <- sknn(Species ~ ., data = iris) predict(x, iris) x <- sknn(Species ~ ., gamma = 10, kn = 10, data = iris) predict(x, iris)
Run the code above in your browser using DataLab