predict.classiKnn: predict a classiKnn object

Description Usage Arguments See Also

Description

predict function for a classiKnn object.

Usage

1
2
3
## S3 method for class 'classiKnn'
predict(object, newdata = NULL,
  predict.type = "response", parallel = FALSE, ...)

Arguments

object

[classiKnn]
object of class classiKnn to get predictions from

newdata

[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.

predict.type

[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.

parallel

[logical(1)]
Should the prediction be parallelized? Uses parallelMap for parallelization. See ... for further arguments.

...

[list]
additional arguments to computeDistMat.

See Also

classiKnn


maierhofert/classiFunc documentation built on May 21, 2019, 11:06 a.m.