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.
    • distType

      @Option(longName="knn-distance-type", usage="Distance metric to use.") public DistanceType distType
      Distance metric to use. Defaults to L2 (EUCLIDEAN).
    • 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.
    • nqFactoryType

      @Option(longName="knn-neighbour-query-factory-type", usage="The nearest neighbour implementation factory to use.") public NeighboursQueryFactoryType nqFactoryType
      The nearest neighbour implementation factory to use. Defaults to NeighboursQueryFactoryType.BRUTE_FORCE.
  • Constructor Details

    • KNNClassifierOptions

      public KNNClassifierOptions()
  • Method Details