predict.sknn | R Documentation |
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
sknn
, knn
data(iris)
x <- sknn(Species ~ ., data = iris)
predict(x, iris)
x <- sknn(Species ~ ., gamma = 10, kn = 10, data = iris)
predict(x, iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.