public static class KNN.Trainer<T> extends ClassifierTrainer<T>
Constructor and Description |
---|
KNN.Trainer(Distance<T> distance,
int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
KNN<T> |
train(T[] x,
int[] y)
Learns a classifier with given training data.
|
setAttributes
public KNN<T> train(T[] x, int[] y)
ClassifierTrainer
train
in class ClassifierTrainer<T>
x
- the training instances.y
- the training labels.Copyright © 2015. All rights reserved.