Class HpCategorical<T>

  • Type Parameters:
    T - the type of the options
    Direct Known Subclasses:
    HpBool

    public class HpCategorical<T>
    extends Hyperparameter<T>
    A Hyperparameter which is one of a fixed number of options (similar to an enum).
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      HpCategorical​(java.lang.String name, java.util.List<T> categories)
      Constructs a HpCategorical.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T random()
      Returns a random value for the hyperparameter for a range of a fixed value if it is a HpVal.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HpCategorical

        public HpCategorical​(java.lang.String name,
                             java.util.List<T> categories)
        Constructs a HpCategorical.
        Parameters:
        name - the name of the hyperparameters
        categories - the valid values for the hyperparameter
    • Method Detail

      • random

        public T random()
        Returns a random value for the hyperparameter for a range of a fixed value if it is a HpVal.
        Specified by:
        random in class Hyperparameter<T>
        Returns:
        a random value for the hyperparameter for a range of a fixed value if it is a HpVal
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object