jsat.math.decayrates
Class InverseDecay
- java.lang.Object
-
- jsat.math.decayrates.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 byPegasos, 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 rateInverseDecay(double tau, double alpha)Creates a new Inverse decay rate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DecayRateclone()doublegetAlpha()Returns the scaling parameterdoublegetTau()Returns the early rate dampening parameterdoublerate(double time, double initial)Decays the initial value over time.doublerate(double time, double maxTime, double initial)Decays the initial value over time.voidsetAlpha(double alpha)Controls the scaling of the divisor, increasing α dampens the whole range of values.voidsetTau(double tau)Controls the rate early in time, but has a decreasing impact on the rate returned as time goes forward.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsat.parameters.Parameterized
getParameter, getParameters
-
-
-
-
Constructor Detail
-
InverseDecay
public InverseDecay(double tau, double alpha)Creates a new Inverse decay rate- Parameters:
tau- the initial time offsetalpha- 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:DecayRateDecays the initial value over time.
-
rate
public double rate(double time, double initial)Description copied from interface:DecayRateDecays the initial value over time.
-
clone
public DecayRate clone()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG