Class ExponentialDecayFunction

    • Constructor Detail

      • ExponentialDecayFunction

        public ExponentialDecayFunction​(double initValue,
                                        double valueAtNumCall,
                                        long numCall)
        Creates an instance. It will be such that
        • a = initValue
        • b = -numCall / ln(valueAtNumCall / initValue)
        Parameters:
        initValue - Initial value, i.e. applyAsDouble(0).
        valueAtNumCall - Value of the function at numCall.
        numCall - Argument for which the function returns valueAtNumCall.
        Throws:
        IllegalArgumentException - if initValue <= 0, valueAtNumCall <= 0, valueAtNumCall >= initValue or numCall <= 0.
    • Method Detail

      • applyAsDouble

        public double applyAsDouble​(long numCall)
        Computes a e-numCall / b.
        Specified by:
        applyAsDouble in interface LongToDoubleFunction
        Parameters:
        numCall - Current step of the training task.
        Returns:
        the value of the function at numCall.