Enum Class KNNModel.Backend

java.lang.Object
java.lang.Enum<KNNModel.Backend>
org.tribuo.common.nearest.KNNModel.Backend
All Implemented Interfaces:
Serializable, Comparable<KNNModel.Backend>, Constable
Enclosing class:
KNNModel<T extends Output<T>>

public static enum KNNModel.Backend extends Enum<KNNModel.Backend>
The parallel backend for batch predictions.
  • Enum Constant Details

    • STREAMS

      public static final KNNModel.Backend STREAMS
      Uses the streams API for parallelism when scoring a batch of predictions.
    • THREADPOOL

      public static final KNNModel.Backend THREADPOOL
      Uses a thread pool at the outer level (i.e., one thread per prediction).
    • INNERTHREADPOOL

      public static final KNNModel.Backend INNERTHREADPOOL
      Uses a thread pool at the inner level (i.e., the whole thread pool works on each prediction).
  • Method Details

    • values

      public static KNNModel.Backend[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KNNModel.Backend valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null