Predict the class of a new observation based on k-NN.
# S3 method for ipredknn
predict(object, newdata, type=c("prob", "class"), ...)Either the predicted class or the the proportion of the votes for the winning class.
object of class ipredknn.
a data frame of new observations.
return either the predicted class or the the proportion of the votes for the winning class.
additional arguments.
This function is a method for the generic function predict
for class ipredknn. For the details see knn.