shark::QpBoxLinear< InputT > Class Template Reference

Quadratic program solver for box-constrained problems with linear kernel. More...

#include <shark/Algorithms/QP/QpBoxLinear.h>

Public Types

typedef LabeledData< InputT, unsigned int > DatasetType
 
typedef LabeledData< InputT, unsigned int >::const_element_reference ElementType
 

Public Member Functions

 QpBoxLinear (const DatasetType &dataset, std::size_t dim)
 Constructor. More...
 
RealVector solve (double C, QpStoppingCondition &stop, QpSolutionProperties *prop=NULL, bool verbose=false)
 Solve the SVM training problem. More...
 

Protected Attributes

DataView< const DatasetTypem_data
 view on training data More...
 
RealVector m_xSquared
 diagonal entries of the quadratic matrix More...
 
std::size_t m_dim
 input space dimension More...
 

Detailed Description

template<class InputT>
class shark::QpBoxLinear< InputT >

Quadratic program solver for box-constrained problems with linear kernel.

The QpBoxLinear class is a decomposition-based solver for linear support vector machine classifiers trained with the hinge loss. Its optimization is largely based on the paper
"A Dual Coordinate Descent Method for Large-scale Linear SVM" by Hsieh, Chang, and Lin, ICML, 2007. However, the present algorithm differs quite a bit, since it learns variable preferences as a replacement for the missing working set selection. At the same time, this method replaces the shrinking heuristic.

Definition at line 73 of file QpBoxLinear.h.

Member Typedef Documentation

template<class InputT>
typedef LabeledData<InputT, unsigned int> shark::QpBoxLinear< InputT >::DatasetType

Definition at line 76 of file QpBoxLinear.h.

template<class InputT>
typedef LabeledData<InputT, unsigned int>::const_element_reference shark::QpBoxLinear< InputT >::ElementType

Definition at line 77 of file QpBoxLinear.h.

Constructor & Destructor Documentation

template<class InputT>
shark::QpBoxLinear< InputT >::QpBoxLinear ( const DatasetType dataset,
std::size_t  dim 
)
inline

Constructor.

Parameters
datasettraining data
dimproblem dimension

Definition at line 85 of file QpBoxLinear.h.

References shark::blas::inner_prod(), shark::QpBoxLinear< InputT >::m_data, shark::QpBoxLinear< InputT >::m_xSquared, and SHARK_ASSERT.

Member Function Documentation

template<class InputT>
RealVector shark::QpBoxLinear< InputT >::solve ( double  C,
QpStoppingCondition stop,
QpSolutionProperties prop = NULL,
bool  verbose = false 
)
inline

Member Data Documentation

template<class InputT>
DataView<const DatasetType> shark::QpBoxLinear< InputT >::m_data
protected

view on training data

Definition at line 308 of file QpBoxLinear.h.

Referenced by shark::QpBoxLinear< InputT >::QpBoxLinear(), and shark::QpBoxLinear< InputT >::solve().

template<class InputT>
std::size_t shark::QpBoxLinear< InputT >::m_dim
protected

input space dimension

Definition at line 310 of file QpBoxLinear.h.

Referenced by shark::QpBoxLinear< InputT >::solve(), and shark::QpBoxLinear< CompressedRealVector >::solve().

template<class InputT>
RealVector shark::QpBoxLinear< InputT >::m_xSquared
protected

diagonal entries of the quadratic matrix

Definition at line 309 of file QpBoxLinear.h.

Referenced by shark::QpBoxLinear< InputT >::QpBoxLinear(), and shark::QpBoxLinear< InputT >::solve().


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