SHOGUN
4.1.0
|
The first order cost function base class with bound constrains.
This class gives the interface used in a first-order gradient-based bound constrained minimizer
Definition at line 45 of file FirstOrderBoundConstraintsCostFunction.h.
Public Member Functions | |
virtual SGVector< float64_t > | get_lower_bound ()=0 |
virtual SGVector< float64_t > | get_upper_bound ()=0 |
virtual float64_t | get_cost ()=0 |
virtual SGVector< float64_t > | obtain_variable_reference ()=0 |
virtual SGVector< float64_t > | get_gradient ()=0 |
|
pure virtualinherited |
Get the cost given current target variables
For least square, that is the value of \(f(w)\) given \(w\) is known
This method will be called by FirstOrderMinimizer::minimize()
Implemented in FirstOrderSAGCostFunction, and FirstOrderStochasticCostFunction.
Get the gradient value wrt target variables
For least squares, that is the value of \(\frac{\partial f(w) }{\partial w}\) given \(w\) is known
This method will be called by FirstOrderMinimizer::minimize()
Implemented in FirstOrderSAGCostFunction, and FirstOrderStochasticCostFunction.
Get the lower bound of variables
Usually the length of the bound should equal to the length of target variables.
If the length of the bound is 1, the bound constrain is applied to all target variables.
Get the upper bound of variables
Usually the length of the bound should equal to the length of target variables.
If the length of the bound is 1, the bound constrain is applied to all target variables.
Obtain a reference of target variables Minimizers will modify target variables in place.
This method will be called by FirstOrderMinimizer::minimize()
For least squares, that is \(w\)