Learn R Programming

multivarious (version 0.3.1)

classifier.discriminant_projector: Create a k-NN classifier for a discriminant projector

Description

Create a k-NN classifier for a discriminant projector

Usage

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

Value

a classifier object

Arguments

x

the discriminant projector object

colind

an optional vector specifying the column indices of the components

knn

the number of nearest neighbors (default=1)

...

extra arguments

Examples

Run this code
# Assume dp is a fitted discriminant_projector object
# classifier(dp, knn = 5) # Basic example

Run the code above in your browser using DataLab