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... | |
void | setOffset (double newOffset) |
double | offsetGradient () const |
RealVector const & | solutionWeightVector () const |
void | solve (double bound, double reg, QpStoppingCondition &stop, QpSolutionProperties *prop=NULL, bool verbose=false) |
Solve the SVM training problem. More... | |
Protected Attributes | |
DataView< const DatasetType > | m_data |
view on training data More... | |
std::size_t | m_dim |
input space dimension More... | |
RealVector | m_xSquared |
diagonal entries of the quadratic matrix More... | |
RealVector | m_alpha |
storage of the m_alpha values for warm start More... | |
RealVector | m_weights |
storage of weight vector for warm start More... | |
RealVector | m_pref |
measure of success of individual steps More... | |
double | m_offset |
Quadratic program solver for box-constrained problems with linear kernel.
Definition at line 67 of file QpBoxLinear.h.
typedef LabeledData<InputT, unsigned int> shark::QpBoxLinear< InputT >::DatasetType |
Definition at line 70 of file QpBoxLinear.h.
typedef LabeledData<InputT, unsigned int>::const_element_reference shark::QpBoxLinear< InputT >::ElementType |
Definition at line 71 of file QpBoxLinear.h.
|
inline |
Constructor.
dataset | training data |
dim | problem dimension |
Definition at line 79 of file QpBoxLinear.h.
References shark::QpBoxLinear< InputT >::m_data, shark::QpBoxLinear< InputT >::m_xSquared, and SHARK_ASSERT.
|
inline |
Definition at line 103 of file QpBoxLinear.h.
References shark::QpBoxLinear< InputT >::m_alpha, and shark::QpBoxLinear< InputT >::m_data.
|
inline |
Definition at line 99 of file QpBoxLinear.h.
References shark::QpBoxLinear< InputT >::m_offset.
|
inline |
Definition at line 112 of file QpBoxLinear.h.
References shark::QpBoxLinear< InputT >::m_weights.
|
inline |
Solve the SVM training problem.
bound | upper bound for m_alpha-components, complexity parameter of the hinge loss SVM |
reg | coefficient of the penalty term \(-\frac{reg}{2} \cdot \|\m_alpha\|^2\), reg=1/C where C is the complexity parameter of the squared hinge loss SVM |
stop | stopping condition(s) |
prop | solution properties |
verbose | if true, the solver prints status information and solution statistics |
Definition at line 125 of file QpBoxLinear.h.
References shark::QpBoxLinear< InputT >::m_data, and SHARK_ASSERT.
Referenced by shark::LinearCSvmTrainer< InputType >::train(), and shark::SquaredHingeLinearCSvmTrainer< InputType >::train().
|
protected |
storage of the m_alpha values for warm start
Definition at line 329 of file QpBoxLinear.h.
Referenced by shark::QpBoxLinear< InputT >::offsetGradient().
|
protected |
view on training data
Definition at line 326 of file QpBoxLinear.h.
Referenced by shark::QpBoxLinear< InputT >::offsetGradient(), shark::QpBoxLinear< InputT >::QpBoxLinear(), and shark::QpBoxLinear< InputT >::solve().
|
protected |
input space dimension
Definition at line 327 of file QpBoxLinear.h.
|
protected |
Definition at line 332 of file QpBoxLinear.h.
Referenced by shark::QpBoxLinear< InputT >::setOffset().
|
protected |
measure of success of individual steps
Definition at line 331 of file QpBoxLinear.h.
|
protected |
storage of weight vector for warm start
Definition at line 330 of file QpBoxLinear.h.
Referenced by shark::QpBoxLinear< InputT >::solutionWeightVector().
|
protected |
diagonal entries of the quadratic matrix
Definition at line 328 of file QpBoxLinear.h.
Referenced by shark::QpBoxLinear< InputT >::QpBoxLinear().