Turi Create
4.0
|
Classes | |
class | turi::optimization::lbfgs_solver |
Functions | |
turi::optimization::lbfgs_solver::lbfgs_solver (std::shared_ptr< first_order_opt_interface > _model) | |
void | turi::optimization::lbfgs_solver::setup (const DenseVector &init_point, const std::map< std::string, flexible_type > &opts, const std::shared_ptr< smooth_regularizer_interface > ®=nullptr) |
bool | turi::optimization::lbfgs_solver::next_iteration () |
const solver_status & | turi::optimization::lbfgs_solver::status () const |
solver_status | turi::optimization::lbfgs (std::shared_ptr< first_order_opt_interface > model, const DenseVector &init_point, const std::map< std::string, flexible_type > &opts, const std::shared_ptr< smooth_regularizer_interface > ®=nullptr) |
Variables | |
size_t | turi::optimization::solver_status::iteration = 0 |
double | turi::optimization::solver_status::solver_time = 0 |
DenseVector | turi::optimization::solver_status::solution |
DenseVector | turi::optimization::solver_status::gradient |
DenseMatrix | turi::optimization::solver_status::hessian |
double | turi::optimization::solver_status::residual = NAN |
double | turi::optimization::solver_status::function_value = NAN |
size_t | turi::optimization::solver_status::num_function_evaluations = 0 |
size_t | turi::optimization::solver_status::num_gradient_evaluations = 0 |
double | turi::optimization::solver_status::step_size = 0 |
OPTIMIZATION_STATUS | turi::optimization::solver_status::status = OPTIMIZATION_STATUS::OPT_UNSET |
|
inline |
solver_status turi::optimization::lbfgs | ( | std::shared_ptr< first_order_opt_interface > | model, |
const DenseVector & | init_point, | ||
const std::map< std::string, flexible_type > & | opts, | ||
const std::shared_ptr< smooth_regularizer_interface > & | reg = nullptr |
||
) |
Solves lbgfgs problem end-to-end.
This class wraps the above iterative solver in a convenience function, iterating the solution until completion.
model | The implementation of first_order_opt_interface used in the optimization. |
init_point | The initial point at which the optimization starts. |
opts | The options. Uses all the options given to setup() in the lbfgs_solver class, plus "max_iterations" to terminate the optimization after a given number of iterations. |
reg | Optional regularization interface. |
bool turi::optimization::lbfgs_solver::next_iteration | ( | ) |
Perform the next update of the solution.
Call this method repeatedly to perform the optimization. Each iteration updates the solution point with one step.
void turi::optimization::lbfgs_solver::setup | ( | const DenseVector & | init_point, |
const std::map< std::string, flexible_type > & | opts, | ||
const std::shared_ptr< smooth_regularizer_interface > & | reg = nullptr |
||
) |
Sets up (or resets) the solver.
[in] | init_point | Starting point for the solver. |
[in] | opts | Solver options. Options are "lbfgs_memory_level" and "convergence_threshold". If not given, defaults are taken from the table in optimization_interface.hpp. |
[in] | reg | Shared ptr to an interface to a smooth regularizer. |
|
inline |
double turi::optimization::solver_status::function_value = NAN |
DenseVector turi::optimization::solver_status::gradient |
DenseMatrix turi::optimization::solver_status::hessian |
size_t turi::optimization::solver_status::iteration = 0 |
size_t turi::optimization::solver_status::num_function_evaluations = 0 |
size_t turi::optimization::solver_status::num_gradient_evaluations = 0 |
double turi::optimization::solver_status::residual = NAN |
DenseVector turi::optimization::solver_status::solution |
double turi::optimization::solver_status::solver_time = 0 |
OPTIMIZATION_STATUS turi::optimization::solver_status::status = OPTIMIZATION_STATUS::OPT_UNSET |