public class KNNClassifierOptions extends Object implements ClassificationOptions<KNNTrainer<Label>>
Modifier and Type | Class and Description |
---|---|
static class |
KNNClassifierOptions.EnsembleCombinerType
The type of combination function.
|
Modifier and Type | Field and Description |
---|---|
KNNModel.Backend |
knnBackend |
KNNTrainer.Distance |
knnDistance |
KNNClassifierOptions.EnsembleCombinerType |
knnEnsembleCombiner |
int |
knnK |
int |
knnNumThreads |
Constructor and Description |
---|
KNNClassifierOptions() |
Modifier and Type | Method and Description |
---|---|
String |
getOptionsDescription() |
KNNTrainer<Label> |
getTrainer()
Constructs the trainer based on the provided arguments.
|
@Option(longName="knn-k", usage="K nearest neighbours to use. Defaults to 1.") public int knnK
@Option(longName="knn-num-threads", usage="Number of threads to use. Defaults to 1.") public int knnNumThreads
@Option(longName="knn-distance", usage="Distance metric to use. Defaults to L2.") public KNNTrainer.Distance knnDistance
@Option(longName="knn-backend", usage="Parallel backend to use.") public KNNModel.Backend knnBackend
@Option(longName="knn-voting", usage="Parallel backend to use.") public KNNClassifierOptions.EnsembleCombinerType knnEnsembleCombiner
public String getOptionsDescription()
getOptionsDescription
in interface com.oracle.labs.mlrg.olcut.config.Options
public KNNTrainer<Label> getTrainer()
ClassificationOptions
getTrainer
in interface ClassificationOptions<KNNTrainer<Label>>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.