bpp-core3
3.0.0
|
Stop condition on parameters. More...
#include <Bpp/Numeric/Function/OptimizationStopCondition.h>
Public Member Functions | |
ParametersStopCondition (const OptimizerInterface *optimizer) | |
ParametersStopCondition (const OptimizerInterface *optimizer, double tolerance) | |
ParametersStopCondition (const OptimizerInterface *optimizer, int burnin) | |
ParametersStopCondition (const OptimizerInterface *optimizer, double tolerance, int burnin) | |
virtual | ~ParametersStopCondition () |
ParametersStopCondition * | clone () const |
Create a copy of this object and send a pointer to it. More... | |
void | init () |
Initialize the condition. More... | |
bool | isToleranceReached () const |
Tell if the we reached the desired tolerance with a given new set of estimates. More... | |
double | getCurrentTolerance () const |
Get the current tolerance. More... | |
const OptimizerInterface * | getOptimizer () const |
void | setOptimizer (const OptimizerInterface *optimizer) |
Set the optimizer attached to this instance. More... | |
void | setTolerance (double tolerance) |
Set the tolerance parameter. More... | |
double | getTolerance () const |
Get the tolerance parameter. More... | |
virtual void | resetCounter () |
virtual void | setBurnin (int burnin) |
virtual int | getBurnin () const |
Protected Attributes | |
const OptimizerInterface * | optimizer_ |
double | tolerance_ |
double | callCount_ |
Count the number of times the isToleranceReached() function has been called. More... | |
int | burnin_ |
Private Attributes | |
ParameterList | lastParametersEstimates_ |
The last estimates of the parameters. More... | |
ParameterList | newParametersEstimates_ |
The new estimates of the parameters. More... | |
Stop condition on parameters.
This stops the optimization when , where is the value of the ith parameter at iteration , and is the value of the ith parameter at iteration .
Definition at line 189 of file OptimizationStopCondition.h.
ParametersStopCondition::ParametersStopCondition | ( | const OptimizerInterface * | optimizer | ) |
Definition at line 15 of file OptimizationStopCondition.cpp.
References init(), newParametersEstimates_, and bpp::ParameterList::size().
ParametersStopCondition::ParametersStopCondition | ( | const OptimizerInterface * | optimizer, |
double | tolerance | ||
) |
Definition at line 29 of file OptimizationStopCondition.cpp.
References init(), newParametersEstimates_, and bpp::ParameterList::size().
ParametersStopCondition::ParametersStopCondition | ( | const OptimizerInterface * | optimizer, |
int | burnin | ||
) |
Definition at line 44 of file OptimizationStopCondition.cpp.
References init(), newParametersEstimates_, and bpp::ParameterList::size().
ParametersStopCondition::ParametersStopCondition | ( | const OptimizerInterface * | optimizer, |
double | tolerance, | ||
int | burnin | ||
) |
Definition at line 59 of file OptimizationStopCondition.cpp.
References init(), newParametersEstimates_, and bpp::ParameterList::size().
|
inlinevirtual |
Definition at line 213 of file OptimizationStopCondition.h.
|
inlinevirtual |
Create a copy of this object and send a pointer to it.
Implements bpp::OptimizationStopCondition.
Definition at line 215 of file OptimizationStopCondition.h.
|
inlinevirtualinherited |
Definition at line 177 of file OptimizationStopCondition.h.
|
virtual |
Get the current tolerance.
This is computed from the last check performed. Initially, it is equal to the tolerance parameter.
Implements bpp::OptimizationStopCondition.
Definition at line 109 of file OptimizationStopCondition.cpp.
References bpp::AbstractOptimizationStopCondition::burnin_, bpp::AbstractOptimizationStopCondition::callCount_, bpp::Parameter::getName(), bpp::Parameter::getValue(), lastParametersEstimates_, newParametersEstimates_, bpp::ParameterList::parameter(), bpp::ParameterList::size(), and bpp::AbstractOptimizationStopCondition::tolerance_.
|
inlinevirtualinherited |
Implements bpp::OptimizationStopCondition.
Definition at line 163 of file OptimizationStopCondition.h.
|
inlinevirtualinherited |
Get the tolerance parameter.
Implements bpp::OptimizationStopCondition.
Definition at line 169 of file OptimizationStopCondition.h.
Referenced by bpp::GoldenSectionSearch::GSSStopCondition::isToleranceReached().
|
virtual |
Initialize the condition.
Reimplemented from bpp::AbstractOptimizationStopCondition.
Definition at line 77 of file OptimizationStopCondition.cpp.
References bpp::OptimizerInterface::getFunction(), bpp::OptimizerInterface::getParameters(), bpp::AbstractOptimizationStopCondition::init(), newParametersEstimates_, and bpp::AbstractOptimizationStopCondition::optimizer_.
Referenced by ParametersStopCondition().
|
virtual |
Tell if the we reached the desired tolerance with a given new set of estimates.
The new parameter list is compared to the last estimates, and the lastParameterEstimates list is actulaized with the newParameters list.
Implements bpp::OptimizationStopCondition.
Definition at line 86 of file OptimizationStopCondition.cpp.
References bpp::AbstractOptimizationStopCondition::burnin_, bpp::AbstractOptimizationStopCondition::callCount_, bpp::Parameter::getName(), bpp::OptimizerInterface::getParameters(), bpp::Parameter::getValue(), lastParametersEstimates_, newParametersEstimates_, bpp::AbstractOptimizationStopCondition::optimizer_, bpp::ParameterList::parameter(), bpp::ParameterList::size(), and bpp::AbstractOptimizationStopCondition::tolerance_.
|
inlinevirtualinherited |
Definition at line 173 of file OptimizationStopCondition.h.
|
inlinevirtualinherited |
Definition at line 175 of file OptimizationStopCondition.h.
|
inlinevirtualinherited |
Set the optimizer attached to this instance.
optimizer | The optimizer to which this instance belongs to. |
Implements bpp::OptimizationStopCondition.
Definition at line 165 of file OptimizationStopCondition.h.
|
inlinevirtualinherited |
Set the tolerance parameter.
tolerance | The tolerance parameter. |
Implements bpp::OptimizationStopCondition.
Definition at line 167 of file OptimizationStopCondition.h.
|
protectedinherited |
Definition at line 118 of file OptimizationStopCondition.h.
Referenced by bpp::BrentOneDimension::BODStopCondition::BODStopCondition(), getCurrentTolerance(), bpp::FunctionStopCondition::getCurrentTolerance(), bpp::PowellMultiDimensions::PMDStopCondition::isToleranceReached(), bpp::GoldenSectionSearch::GSSStopCondition::isToleranceReached(), bpp::BrentOneDimension::BODStopCondition::isToleranceReached(), isToleranceReached(), bpp::FunctionStopCondition::isToleranceReached(), and bpp::AbstractOptimizationStopCondition::operator=().
|
mutableprotectedinherited |
Count the number of times the isToleranceReached() function has been called.
Definition at line 116 of file OptimizationStopCondition.h.
Referenced by getCurrentTolerance(), bpp::FunctionStopCondition::getCurrentTolerance(), bpp::GoldenSectionSearch::GSSStopCondition::isToleranceReached(), bpp::PowellMultiDimensions::PMDStopCondition::isToleranceReached(), bpp::BrentOneDimension::BODStopCondition::isToleranceReached(), isToleranceReached(), bpp::FunctionStopCondition::isToleranceReached(), and bpp::AbstractOptimizationStopCondition::operator=().
|
mutableprivate |
The last estimates of the parameters.
This is used by the isToleranceReached() method.
Definition at line 198 of file OptimizationStopCondition.h.
Referenced by getCurrentTolerance(), and isToleranceReached().
|
mutableprivate |
The new estimates of the parameters.
This is used by the isToleranceReached() method.
Definition at line 205 of file OptimizationStopCondition.h.
Referenced by getCurrentTolerance(), init(), isToleranceReached(), and ParametersStopCondition().
|
protectedinherited |
Definition at line 109 of file OptimizationStopCondition.h.
Referenced by bpp::GoldenSectionSearch::GSSStopCondition::getCurrentTolerance(), bpp::PowellMultiDimensions::PMDStopCondition::getCurrentTolerance(), bpp::BrentOneDimension::BODStopCondition::getCurrentTolerance(), init(), bpp::FunctionStopCondition::init(), bpp::BrentOneDimension::BODStopCondition::isToleranceReached(), isToleranceReached(), bpp::FunctionStopCondition::isToleranceReached(), and bpp::AbstractOptimizationStopCondition::operator=().
|
protectedinherited |
Definition at line 110 of file OptimizationStopCondition.h.
Referenced by bpp::BrentOneDimension::BODStopCondition::BODStopCondition(), getCurrentTolerance(), bpp::FunctionStopCondition::getCurrentTolerance(), bpp::PowellMultiDimensions::PMDStopCondition::isToleranceReached(), bpp::GoldenSectionSearch::GSSStopCondition::isToleranceReached(), bpp::DownhillSimplexMethod::DSMStopCondition::isToleranceReached(), isToleranceReached(), bpp::FunctionStopCondition::isToleranceReached(), and bpp::AbstractOptimizationStopCondition::operator=().