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

Class InverseDecay

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


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

    This decay rate can be used to create the same rate used by Pegasos, by using an initial rate of 1 and setting τ = 1 and α = λ, where λ is the regularization term used by the method calling the decay rate.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      InverseDecay()
      Creates a new Inverse Decay rate
      InverseDecay(double tau, double alpha)
      Creates a new Inverse 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 of the divisor, increasing α dampens the whole range of values.
      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

      • InverseDecay

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

        public InverseDecay()
        Creates a new Inverse Decay rate
    • Method Detail

      • setAlpha

        public void setAlpha(double alpha)
        Controls the scaling of the divisor, increasing α dampens the whole range of values. Increasing it increases the values. value.
        Parameters:
        alpha - the scaling parameter
      • 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.