Skip to contents

Constructs a k-NN classifier for a discriminant projector, with an option to use a subset of the components.

Usage

# S3 method for discriminant_projector
classifier(x, colind = NULL, knn = 1, ...)

Arguments

x

the discriminant projector object

colind

an optional vector specifying the column indices of the components to use for prediction (NULL by default)

knn

the number of nearest neighbors to consider in the k-NN classifier (default is 1)

...

extra arguments

Value

a classifier object