52 if(
m_fun && bound_constraints_fun)
54 SG_SWARNING(
"The minimizer does not support constrained minimization. All constraints will be ignored.\n")
59 void CLBFGSMinimizer::init()
102 int32_t max_linesearch,
104 int32_t max_iterations,
115 int32_t orthantwise_start,
116 int32_t orthantwise_end)
120 m_linesearch_id = LBFGSLineSearchHelper::get_lbfgs_linear_search_id(linesearch);
167 &cost, CLBFGSMinimizer::evaluate,
168 NULL,
this, &lbfgs_param);
172 SG_SWARNING(
"Error(s) happened during L-BFGS optimization (error code:%d)\n",
186 REQUIRE(obj_prt,
"The instance object passed to L-BFGS optimizer should not be NULL\n");
196 "The length of gradient (%d) and the length of variable (%d) do not match\n",
virtual SGVector< float64_t > get_gradient()=0
virtual float64_t minimize()
int32_t lbfgs(int32_t n, float64_t *x, float64_t *ptr_fx, lbfgs_evaluate_t proc_evaluate, lbfgs_progress_t proc_progress, void *instance, lbfgs_parameter_t *_param, lbfgs_adjust_step_t proc_adjust_step)
virtual void init_minimization()
FirstOrderCostFunction * m_fun
int32_t m_orthantwise_end
The first order cost function base class with bound constrains.
float64_t m_orthantwise_c
The class wraps the Shogun's C-style LBFGS minimizer.
The first order cost function base class.
int32_t m_orthantwise_start
virtual float64_t get_cost()=0
virtual void set_lbfgs_parameters(int32_t m=100, int32_t max_linesearch=1000, ELBFGSLineSearch linesearch=BACKTRACKING_STRONG_WOLFE, int32_t max_iterations=1000, float64_t delta=0.0, int32_t past=0, float64_t epsilon=1e-5, float64_t min_step=1e-20, float64_t max_step=1e+20, float64_t ftol=1e-4, float64_t wolfe=0.9, float64_t gtol=0.9, float64_t xtol=1e-16, float64_t orthantwise_c=0.0, int32_t orthantwise_start=0, int32_t orthantwise_end=1)
all of classes and functions are contained in the shogun namespace
static int is_infinity(double f)
checks whether a float is infinity
static int is_nan(double f)
checks whether a float is nan
virtual SGVector< float64_t > obtain_variable_reference()=0
SGVector< float64_t > m_target_variable
virtual ~CLBFGSMinimizer()
The first order minimizer base class.