predict.sknn

0th

Percentile

Simple k Nearest Neighbours Classification

Classifies new observations using the sknn learned by the sknn-function.

Keywords
classif
Usage
# S3 method for sknn
predict(object, newdata,...)
Arguments
object

Object of class sknn.

newdata

Data frame (or matrix) of cases to be classified.

...

Value

A list with elements ‘class’ and ‘posterior’.

See Also

sknn, knn

Aliases
  • predict.sknn
Examples
# NOT RUN {
data(iris)
x <- sknn(Species ~ ., data = iris)
predict(x, iris)
x <- sknn(Species ~ ., gamma = 10, kn = 10, data = iris)
predict(x, iris)
# }
Documentation reproduced from package klaR, version 0.6-14, License: GPL-2

Community examples

Looks like there are no examples yet.