Class Hyperparameter<T>

  • Type Parameters:
    T - the type of the hyperparameter
    Direct Known Subclasses:
    HpCategorical, HpFloat, HpInt, HpSet, HpVal

    public abstract class Hyperparameter<T>
    extends java.lang.Object
    A class representing an input to the network that can't be differentiated.

    Some hyperparameters include learning rates, network sizes and shapes, activation choices, and model selection. In order to evaluate a set of hyperparameters, the only way is to fully train your model using those choices of hyperparameters. So, the full training loop involves training the model a number of times using different choices of hyperparameters. This can be mostly automated by using a HpOptimizer.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      Hyperparameter​(java.lang.String name)
      Constructs a hyperparameter with the given name.
    • Method Summary

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
    • Constructor Detail

      • Hyperparameter

        public Hyperparameter​(java.lang.String name)
        Constructs a hyperparameter with the given name.
        Parameters:
        name - the name of the hyperparameter
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the hyperparameter.
        Returns:
        the name of the hyperparameter
      • random

        public abstract T random()
        Returns a random value for the hyperparameter for a range of a fixed value if it is a HpVal.
        Returns:
        a random value for the hyperparameter for a range of a fixed value if it is a HpVal