Class KNNClassifierOptions

java.lang.Object
org.tribuo.common.nearest.KNNClassifierOptions
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Options, ClassificationOptions<KNNTrainer<Label>>

public class KNNClassifierOptions extends Object implements ClassificationOptions<KNNTrainer<Label>>
CLI Options for training a k-nearest neighbour predictor.
  • Field Details

    • knnK

      @Option(longName="knn-k", usage="K nearest neighbours to use.") public int knnK
      K nearest neighbours to use. Defaults to 1.
    • knnNumThreads

      @Option(longName="knn-num-threads", usage="Number of threads to use.") public int knnNumThreads
      Number of threads to use. Defaults to 1.
    • knnDistance

      @Option(longName="knn-distance", usage="Distance metric to use.") public KNNTrainer.Distance knnDistance
      Distance metric to use. Defaults to L2.
    • knnBackend

      @Option(longName="knn-backend", usage="Parallel backend to use.") public KNNModel.Backend knnBackend
      Parallel backend to use.
    • knnEnsembleCombiner

      @Option(longName="knn-voting", usage="Parallel backend to use.") public KNNClassifierOptions.EnsembleCombinerType knnEnsembleCombiner
      Parallel backend to use.
  • Constructor Details

    • KNNClassifierOptions

      public KNNClassifierOptions()
  • Method Details