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

Class LinearDecay

    • Constructor Summary

      Constructors 
      Constructor and Description
      LinearDecay()
      Creates a new linear decay that goes down to 1e-4 after 100,000 units of time
      LinearDecay(double min, double maxTime)
      Creates a new Linear Decay

      Note that when using rate(double, double, double), the maxTime is always superceded by the value given to the function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      DecayRate clone() 
      double getMaxTime()
      Returns the maximum time to use in the rate decay
      double getMinRate()
      Returns the minimum value to return from he rate methods
      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 setMaxTime(double maxTime)
      Sets the maximum amount of time to allow in the rate decay.
      void setMinRate(double min)
      Sets the minimum learning rate to return
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • LinearDecay

        public LinearDecay()
        Creates a new linear decay that goes down to 1e-4 after 100,000 units of time
      • LinearDecay

        public LinearDecay(double min,
                           double maxTime)
        Creates a new Linear Decay

        Note that when using rate(double, double, double), the maxTime is always superceded by the value given to the function.
        Parameters:
        min - a value less than the learning rate that, that will be the minimum returned value
        maxTime - the maximum amount of time
    • Method Detail

      • setMinRate

        public void setMinRate(double min)
        Sets the minimum learning rate to return
        Parameters:
        min - the minimum learning rate to return
      • getMinRate

        public double getMinRate()
        Returns the minimum value to return from he rate methods
        Returns:
        the minimum value to return
      • setMaxTime

        public void setMaxTime(double maxTime)
        Sets the maximum amount of time to allow in the rate decay. Any time value larger will be treated as the set maximum.

        Any calls to rate(double, double, double) will use the value provided in that method call instead.
        Parameters:
        maxTime - the maximum amount of time to allow
      • getMaxTime

        public double getMaxTime()
        Returns the maximum time to use in the rate decay
        Returns:
        the maximum time to use in the rate decay
      • 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.