predict function for a classiKnn object.
# S3 method for classiKnn
predict(object, newdata = NULL,
predict.type = "response", parallel = FALSE, ...)
[classiKnn
]
object of class classiKnn to get predictions from
[data.frame
]
(optional) new data to predict from with observations as rows. Do not derive this data,
this will be done automatically if required by the model. If NULL
,
the training data is predicted, currently without using a leave-one-out prediction.
[character(1)
]
one of 'response' or 'prob', indicating the type of prediction. Choose
'response' to return a vector of length nrow(newdata)
containing the
most predicted class.
Choose 'prob' to return a matrix with nrow(newdata)
rows containing
the probabilities for the classes as columns.
[logical(1)
]
Should the prediction be parallelized?
Uses parallelMap
for
parallelization. See ...
for further arguments.
[list
]
additional arguments to computeDistMat.
classiKnn