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

# S3 method for knnreg
predict(object, newdata, ...)

Arguments

object

object of class knnreg.

newdata

a data frame or matrix of new observations.

...

additional arguments.

Value

a numeric vector

Details

This function is a method for the generic function predict for class knnreg. For the details see knnreg. This is essentially a copy of predict.ipredknn.