public class ExponetialDecay extends Object implements DecayRate, Parameterized
rate(double, double, double)
, or internal by
setMinRate(double)
. setMinRate(double)
is reached.Constructor and Description |
---|
ExponetialDecay()
Creates a new decay rate that decays down to 1e-4
|
ExponetialDecay(double min)
Creates a new Exponential Decay
|
ExponetialDecay(double min,
double maxTime)
Creates a new Exponential Decay
Note that when using rate(double, double, double) , the maxTime
is always superceded by the value given to the function. |
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
|
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 |
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
|
String |
toString() |
public ExponetialDecay(double min)
min
- a value less than the learning rate that, that will be the
minimum rate returned once the maximum time is reachedpublic ExponetialDecay(double min, double maxTime)
rate(double, double, double)
, the maxTime
is always superceded by the value given to the function.min
- a value less than the learning rate that, that will be the
minimum returned valuemaxTime
- the maximum amount of timepublic ExponetialDecay()
public void setMinRate(double min)
min
- the minimum learning rate to returnpublic double getMinRate()
public void setMaxTime(double maxTime)
rate(double, double, double)
will use the value
provided in that method call instead.maxTime
- the maximum amount of time to allowpublic double getMaxTime()
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.