predict.ipredknn {ipred}R Documentation

Predictions from k-Nearest Neighbors

Description

Predict the class of a new observation based on k-NN.

Usage

predict(object, newdata, type=c("prob", "class"), ...)

Arguments

object object of class ipredknn.
newdata a data frame of new observations.
type return either class probability estimates or the predicted class itself.
... additional arguments.

Details

This function is a method for the generic function predict for class ipredknn. For the details see knn.

Value

Either a matrix of predicted class probabilities or the predicted classes itself.

Author(s)

Torsten.Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de>


[Package Contents]