|
DiSMEC++
|
#include <minimizer.h>
Public Member Functions | |
| Minimizer (std::shared_ptr< spdlog::logger > logger={}) | |
| ~Minimizer () override | |
| MinimizationResult | minimize (objective::Objective &objective, Eigen::Ref< DenseRealVector > init) |
| void | set_logger (std::shared_ptr< spdlog::logger > logger) |
| sets the logger object that is used for progress tracking. More... | |
Public Member Functions inherited from dismec::HyperParameterBase | |
| HyperParameterBase ()=default | |
| virtual | ~HyperParameterBase ()=default |
| HyperParameterBase (const HyperParameterBase &)=default | |
| HyperParameterBase (HyperParameterBase &&)=default | |
| HyperParameterBase & | operator= (HyperParameterBase &&)=default |
| HyperParameterBase & | operator= (const HyperParameterBase &)=default |
| void | set_hyper_parameter (const std::string &name, long value) |
| void | set_hyper_parameter (const std::string &name, double value) |
| hyper_param_t | get_hyper_parameter (const std::string &name) const |
| std::vector< std::string > | get_hyper_parameter_names () const |
| Returns a vector that lists all hyper parameter names. More... | |
Public Member Functions inherited from dismec::stats::Tracked | |
| Tracked () | |
Default constructor, creates the internal stats::StatisticsCollection. More... | |
| void | register_stat (const std::string &name, std::unique_ptr< Statistics > stat) |
Registers a tracker for the statistics name. More... | |
| std::shared_ptr< StatisticsCollection > | get_stats () const |
Gets an ownership-sharing reference to the StatisticsCollection. More... | |
Protected Member Functions | |
| virtual MinimizationResult | run (objective::Objective &objective, Eigen::Ref< DenseRealVector > init)=0 |
Protected Member Functions inherited from dismec::HyperParameterBase | |
| template<class U , class S > | |
| void | declare_hyper_parameter (std::string name, U S::*pointer) |
| template<class U , class S > | |
| void | declare_hyper_parameter (std::string name, U(S::*getter)() const, void(S::*setter)(U)) |
| Declares an constrained hyper-parameter with explicit getter and setter function. More... | |
| template<class T , class S > | |
| void | declare_sub_object (const std::string &name, T S::*object) |
| Declares a sub-object that also contains hyper-parameters. More... | |
Protected Member Functions inherited from dismec::stats::Tracked | |
| ~Tracked () | |
| Non-virtual destructor. Declared protected, so we don't accidentally try to do a polymorphic delete. More... | |
| template<class T > | |
| void | record (stat_id_t stat, T &&value) |
Record statistics. This function just forwards all its arguments to the internal StatisticsCollection. More... | |
| void | declare_stat (stat_id_t index, StatisticMetaData meta) |
Declares a new statistics. This function just forwards all its arguments to the internal StatisticsCollection. More... | |
| void | declare_tag (tag_id_t index, std::string name) |
Declares a new tag. This function just forwards all its arguments to the internal StatisticsCollection. More... | |
| template<class... Args> | |
| void | set_tag (tag_id_t tag, long value) |
Set value of tag. This function just forwards all its arguments to the internal StatisticsCollection. More... | |
| template<class... Args> | |
| auto | make_timer (stat_id_t id, Args... args) |
Creates a new ScopeTimer using stats::record_scope_time. More... | |
Protected Attributes | |
| std::shared_ptr< spdlog::logger > | m_Logger |
Additional Inherited Members | |
Public Types inherited from dismec::HyperParameterBase | |
| using | hyper_param_t = std::variant< long, double > |
Definition at line 34 of file minimizer.h.
|
explicit |
Definition at line 14 of file minimizer.cpp.
|
overridedefault |
| MinimizationResult Minimizer::minimize | ( | objective::Objective & | objective, |
| Eigen::Ref< DenseRealVector > | init | ||
| ) |
|
protectedpure virtual |
Implemented in dismec::solvers::NullOptimizer, dismec::solvers::NewtonWithLineSearch, and anonymous_namespace{minimizer.cpp}::MockMinimizer.
Referenced by minimize().
| void Minimizer::set_logger | ( | std::shared_ptr< spdlog::logger > | logger | ) |
sets the logger object that is used for progress tracking.
Definition at line 20 of file minimizer.cpp.
References m_Logger.
|
protected |
Definition at line 45 of file minimizer.h.
Referenced by dismec::solvers::NewtonWithLineSearch::record_iteration(), dismec::solvers::NewtonWithLineSearch::run(), and set_logger().