SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions
FirstOrderBoundConstraintsCostFunction Class Referenceabstract

Detailed Description

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.

Inheritance diagram for FirstOrderBoundConstraintsCostFunction:
Inheritance graph
[legend]

Public Member Functions

virtual SGVector< float64_tget_lower_bound ()=0
 
virtual SGVector< float64_tget_upper_bound ()=0
 
virtual float64_t get_cost ()=0
 
virtual SGVector< float64_tobtain_variable_reference ()=0
 
virtual SGVector< float64_tget_gradient ()=0
 

Member Function Documentation

virtual float64_t get_cost ( )
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()

Returns
cost

Implemented in FirstOrderSAGCostFunction, and FirstOrderStochasticCostFunction.

virtual SGVector<float64_t> get_gradient ( )
pure virtualinherited

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()

Returns
gradient of variables

Implemented in FirstOrderSAGCostFunction, and FirstOrderStochasticCostFunction.

virtual SGVector<float64_t> get_lower_bound ( )
pure virtual

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.

Returns
the lower bound
virtual SGVector<float64_t> get_upper_bound ( )
pure virtual

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.

Returns
the upper bound
virtual SGVector<float64_t> obtain_variable_reference ( )
pure virtualinherited

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\)

Returns
reference of variables

The documentation for this class was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation