Base class for all single objective optimizer. More...
#include <shark/Algorithms/AbstractSingleObjectiveOptimizer.h>
Inheritance diagram for shark::AbstractSingleObjectiveOptimizer< SearchSpace >:
Collaboration diagram for shark::AbstractSingleObjectiveOptimizer< SearchSpace >:Public Types | |
| typedef base_type::SearchSpaceType | SearchSpaceType |
| typedef base_type::SearchPointType | SearchPointType |
| typedef base_type::SolutionSetType | SolutionSetType |
| typedef base_type::ResultType | ResultType |
| typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
Public Types inherited from shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > > | |
| enum | Feature |
| Models features that the optimizer requires from the objective function. More... | |
| typedef SearchSpace | SearchSpaceType |
| typedef SearchSpaceType::PointType | SearchPointType |
| typedef double | ResultType |
| typedef SingleObjectiveResultSet < SearchSpace::PointType > | SolutionSetType |
| typedef AbstractObjectiveFunction < SearchSpaceType, ResultType > | ObjectiveFunctionType |
| typedef TypedFlags< Feature > | Features |
| typedef TypedFeatureNotAvailableException < Feature > | FeatureNotAvailableException |
Public Member Functions | |
| virtual void | init (ObjectiveFunctionType const &function) |
| virtual void | init (ObjectiveFunctionType const &function, SearchPointType const &startingPoint)=0 |
| initializes the optimizer using a predefined starting point More... | |
| virtual const SolutionSetType & | solution () const |
| returns the current solution of the optimizer More... | |
Public Member Functions inherited from shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > > | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | requiresValue () const |
| bool | requiresFirstDerivative () const |
| bool | requiresSecondDerivative () const |
| bool | canSolveConstrained () const |
| bool | requiresClosestFeasible () const |
| virtual | ~AbstractOptimizer () |
| Empty virtual d'tor. More... | |
| virtual void | step (ObjectiveFunctionType const &function)=0 |
| Carry out one step of the optimizer for the supplied objective function. More... | |
Public Member Functions inherited from shark::IConfigurable | |
| virtual | ~IConfigurable () |
| Virtual d'tor. More... | |
| virtual void | configure (const PropertyTree &node) |
| Configures the component given a property tree. More... | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
| virtual std::string | name () const |
| returns the name of the object More... | |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. More... | |
| virtual void | read (InArchive &archive) |
| Read the component from the supplied archive. More... | |
| virtual void | write (OutArchive &archive) const |
| Write the component to the supplied archive. More... | |
| void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). More... | |
| void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). More... | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
| SolutionSetType | m_best |
| current solution of the optimizer More... | |
Protected Attributes inherited from shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > > | |
| Features | m_features |
Additional Inherited Members | |
Protected Member Functions inherited from shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > > | |
| void | checkFeatures (const ObjectiveFunctionType &objectiveFunction) |
| Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer. More... | |
Base class for all single objective optimizer.
This class is a spezialization of the AbstractOptimizer itnerface for the class of single objective optimizers. A single objective optimizer is an optimizer which can only optimize functions with a single objective. This is the default case for most optimisation problems. the class requires the ObjectiveFunction to provide a feasible starting point. If this is not possible, a second version of init is provided where the starting point can be explicitely defined. The Return type of an SingleObjectiveOptimizer is the SingleObjectiveResultSet which is a struct returning the best value of the function and together with it's point.
Definition at line 42 of file AbstractSingleObjectiveOptimizer.h.
| typedef base_type::ObjectiveFunctionType shark::AbstractSingleObjectiveOptimizer< SearchSpace >::ObjectiveFunctionType |
Definition at line 50 of file AbstractSingleObjectiveOptimizer.h.
| typedef base_type::ResultType shark::AbstractSingleObjectiveOptimizer< SearchSpace >::ResultType |
Definition at line 49 of file AbstractSingleObjectiveOptimizer.h.
| typedef base_type::SearchPointType shark::AbstractSingleObjectiveOptimizer< SearchSpace >::SearchPointType |
Definition at line 47 of file AbstractSingleObjectiveOptimizer.h.
| typedef base_type::SearchSpaceType shark::AbstractSingleObjectiveOptimizer< SearchSpace >::SearchSpaceType |
Definition at line 46 of file AbstractSingleObjectiveOptimizer.h.
| typedef base_type::SolutionSetType shark::AbstractSingleObjectiveOptimizer< SearchSpace >::SolutionSetType |
Definition at line 48 of file AbstractSingleObjectiveOptimizer.h.
|
inlinevirtual |
initializes the optimizer. The objectivefunction is required to provide a starting point, so CAN_PROPOSE_STARTING_POINT must be set. If this is not the case, an exception is thrown
Implements shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > >.
Definition at line 54 of file AbstractSingleObjectiveOptimizer.h.
Referenced by shark::AbstractSingleObjectiveOptimizer< VectorSpace< double > >::init(), and shark::OptimizationTrainer< Model, LabelTypeT >::train().
|
pure virtual |
initializes the optimizer using a predefined starting point
Implemented in shark::PointSearch, shark::NestedGridSearch, shark::IRpropPlus, shark::RpropPlus, shark::CMA, shark::GridSearch, shark::QuickpropOriginal, shark::CMSA, shark::RpropMinus, shark::OnePlusOneES, shark::Quickprop, shark::NoisyRprop, shark::LBFGS, shark::BFGS, shark::IRLS, shark::SteepestDescent, and shark::CG.
|
inlinevirtual |
returns the current solution of the optimizer
Implements shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > >.
Definition at line 64 of file AbstractSingleObjectiveOptimizer.h.
Referenced by main(), run_one_trial(), shark::OptimizationTrainer< Model, LabelTypeT >::train(), and trainProblem().
|
protected |
current solution of the optimizer
Definition at line 70 of file AbstractSingleObjectiveOptimizer.h.
Referenced by shark::AbstractSingleObjectiveOptimizer< VectorSpace< double > >::solution().