Learn R Programming

multivarious (version 0.2.0)

predict.classifier: predict with a classifier object

Description

predict with a classifier object

Usage

# S3 method for classifier
predict(
  object,
  new_data,
  ncomp = NULL,
  colind = NULL,
  metric = c("cosine", "euclidean"),
  ...
)

Value

a list with the predicted class and probabilities

Arguments

object

the model fit

new_data

new data to predict on

ncomp

the number of components to use

colind

the column indices to select in the projection matrix

metric

the similarity metric ("euclidean" or "cosine")

...

additional arguments to projection function