Solver for the multi-class maximum margin regression SVM. More...
#include <shark/Algorithms/QP/QpMcLinear.h>
Public Types | |
typedef LabeledData< InputT, unsigned int > | DatasetType |
Public Types inherited from shark::QpMcLinear< InputT > | |
enum | CoordinateSelectionStrategy { UNIFORM, ACF } |
typedef LabeledData< InputT, unsigned int > | DatasetType |
typedef LabeledData< InputT, unsigned int >::const_element_reference | ElementType |
typedef Batch< InputT >::const_reference | InputReferenceType |
Public Member Functions | |
QpMcLinearMMR (const DatasetType &dataset, std::size_t dim, std::size_t classes) | |
Constructor. More... | |
Public Member Functions inherited from shark::QpMcLinear< InputT > | |
QpMcLinear (const DatasetType &dataset, std::size_t dim, std::size_t classes, std::size_t strategy=ACF, bool shrinking=false) | |
Constructor. More... | |
RealMatrix | solve (random::rng_type &rng, double C, QpStoppingCondition &stop, QpSolutionProperties *prop=NULL, bool verbose=false) |
Solve the SVM training problem. More... | |
Protected Member Functions | |
virtual double | calcGradient (RealVector &gradient, RealVector wx, blas::matrix_row< RealMatrix > const &alpha, double C, unsigned int y) |
Compute the gradient from the inner products of the weight vectors with the current sample. More... | |
virtual void | updateWeightVectors (RealMatrix &w, RealVector const &mu, std::size_t index) |
Update the weight vectors (primal variables) after a step on the dual variables. More... | |
virtual double | solveSub (double epsilon, RealVector gradient, double q, double C, unsigned int y, blas::matrix_row< RealMatrix > &alpha, RealVector &mu) |
Solve the sub-problem posed by a single training example. More... | |
Protected Member Functions inherited from shark::QpMcLinear< InputT > | |
void | add_scaled (RealMatrix &w, RealVector const &mu, InputReferenceType x) |
Additional Inherited Members | |
Protected Attributes inherited from shark::QpMcLinear< InputT > | |
DataView< const DatasetType > | m_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... | |
std::size_t | m_classes |
number of classes More... | |
std::size_t | m_strategy |
strategy for coordinate selection More... | |
bool | m_shrinking |
apply shrinking or not? More... | |
Solver for the multi-class maximum margin regression SVM.
Definition at line 723 of file QpMcLinear.h.
typedef LabeledData<InputT, unsigned int> shark::QpMcLinearMMR< InputT >::DatasetType |
Definition at line 726 of file QpMcLinear.h.
|
inline |
Constructor.
Definition at line 729 of file QpMcLinear.h.
|
inlineprotectedvirtual |
Compute the gradient from the inner products of the weight vectors with the current sample.
Implements shark::QpMcLinear< InputT >.
Definition at line 738 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::m_classes.
|
inlineprotectedvirtual |
Solve the sub-problem posed by a single training example.
Implements shark::QpMcLinear< InputT >.
Definition at line 769 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::m_classes.
|
inlineprotectedvirtual |
Update the weight vectors (primal variables) after a step on the dual variables.
Implements shark::QpMcLinear< InputT >.
Definition at line 757 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::add_scaled(), shark::QpMcLinear< InputT >::m_classes, and shark::QpMcLinear< InputT >::m_data.