Learn R Programming

classiFunc (version 0.1.1)

predict.classiKernel: predict a classiKernel object

Description

predict function for a classiKnn object.

Usage

# S3 method for classiKernel
predict(object, newdata = NULL,
  predict.type = "response", parallel = FALSE, ...)

Arguments

object

[classiKernel] object of class classiKernel 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

classiKernel