public class PowerDecay extends Object implements DecayRate, Parameterized
τ
+ time)-α
InverseDecay
is a special case of this decay when α=1. NoDecay
is a special case of this decay when α = 0 Constructor and Description |
---|
PowerDecay()
Creates a new Power Decay rate
|
PowerDecay(double tau,
double alpha)
Creates a new Power decay rate
|
Modifier and Type | Method and Description |
---|---|
DecayRate |
clone() |
double |
getAlpha()
Returns the scaling parameter
|
Parameter |
getParameter(String paramName)
Returns the parameter with the given name.
|
List<Parameter> |
getParameters()
Returns the list of parameters that can be altered for this learner.
|
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.
|
String |
toString() |
public PowerDecay(double tau, double alpha)
tau
- the initial time offsetalpha
- the time scalingpublic PowerDecay()
public void setAlpha(double alpha)
alpha
- the scaling parameter in [0, ∞), but should generally
be kept in (0, 1).public double getAlpha()
public void setTau(double tau)
tau
- the early rate dampening parameterpublic double getTau()
public double rate(double time, double maxTime, double initial)
DecayRate
public double rate(double time, double initial)
DecayRate
public DecayRate clone()
public List<Parameter> getParameters()
Parameterized
getParameters
in interface Parameterized
public Parameter getParameter(String paramName)
Parameterized
getParameter
in interface Parameterized
paramName
- the name of the parameter to obtainCopyright © 2017. All rights reserved.