Documentation of 'jsat.math.decayrates.PowerDecay' Java class
PowerDecay
jsat.math.decayrates

Class PowerDecay

  • All Implemented Interfaces:
    java.io.Serializable, DecayRate, Parameterized


    public class PowerDecay
    extends java.lang.Object
    implements DecayRate, Parameterized
    Decays an input by power of the amount of time that has occurred, the max time being irrelevant. More specifically as η (τ + time)-α

    InverseDecay is a special case of this decay when α=1.
    NoDecay is a special case of this decay when α = 0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PowerDecay()
      Creates a new Power Decay rate
      PowerDecay(double tau, double alpha)
      Creates a new Power decay rate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      DecayRate clone() 
      double getAlpha()
      Returns the scaling parameter
      double getTau()
      Returns the early rate dampening parameter
      double rate(double time, double initial)
      Decays the initial value over time.
      double rate(double time, double maxTime, double initial)
      Decays the initial value over time.
      void setAlpha(double alpha)
      Controls the scaling via exponentiation, increasing α increases the rate at which the rate decays.
      void setTau(double tau)
      Controls the rate early in time, but has a decreasing impact on the rate returned as time goes forward.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • PowerDecay

        public PowerDecay(double tau,
                          double alpha)
        Creates a new Power decay rate
        Parameters:
        tau - the initial time offset
        alpha - the time scaling
      • PowerDecay

        public PowerDecay()
        Creates a new Power Decay rate
    • Method Detail

      • setAlpha

        public void setAlpha(double alpha)
        Controls the scaling via exponentiation, increasing α increases the rate at which the rate decays. As α goes to zero, the decay rate goes toward zero (meaning the value returned becomes constant),
        Parameters:
        alpha - the scaling parameter in [0, ∞), but should generally be kept in (0, 1).
      • getAlpha

        public double getAlpha()
        Returns the scaling parameter
        Returns:
        the scaling parameter
      • setTau

        public void setTau(double tau)
        Controls the rate early in time, but has a decreasing impact on the rate returned as time goes forward. Larger values of τ dampen the initial rates returned, while lower values let the initial rates start higher.
        Parameters:
        tau - the early rate dampening parameter
      • getTau

        public double getTau()
        Returns the early rate dampening parameter
        Returns:
        the early rate dampening parameter
      • rate

        public double rate(double time,
                           double maxTime,
                           double initial)
        Description copied from interface: DecayRate
        Decays the initial value over time.
        Specified by:
        rate in interface DecayRate
        Parameters:
        time - the current time through the algorithm in the range [0, maxTime]
        maxTime - the maximum time step that will be seen
        initial - the initial value
        Returns:
        the decayed value over time of the initial value
      • rate

        public double rate(double time,
                           double initial)
        Description copied from interface: DecayRate
        Decays the initial value over time.
        Specified by:
        rate in interface DecayRate
        Parameters:
        time - the current time step to return a value for
        initial - the initial learning rate
        Returns:
        the decayed value
      • clone

        public DecayRate clone()
        Specified by:
        clone in interface DecayRate
        Overrides:
        clone in class java.lang.Object
      • toString

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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.