Solver for the multi-class SVM with absolute margin and discriminative maximum loss. More...
#include <shark/Algorithms/QP/QpMcLinear.h>
Inheritance diagram for shark::QpMcLinearADM< InputT >: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 | |
| QpMcLinearADM (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 (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, RealMatrixRow 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, RealMatrixRow &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 SVM with absolute margin and discriminative maximum loss.
Definition at line 1328 of file QpMcLinear.h.
| typedef LabeledData<InputT, unsigned int> shark::QpMcLinearADM< InputT >::DatasetType |
Definition at line 1331 of file QpMcLinear.h.
|
inline |
Constructor.
Definition at line 1334 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 1343 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::m_classes, and shark::blas::max().
|
inlineprotectedvirtual |
Solve the sub-problem posed by a single training example.
Implements shark::QpMcLinear< InputT >.
Definition at line 1397 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::m_classes, and MAXITER_MULTIPLIER.
|
inlineprotectedvirtual |
Update the weight vectors (primal variables) after a step on the dual variables.
Implements shark::QpMcLinear< InputT >.
Definition at line 1386 of file QpMcLinear.h.
References shark::QpMcLinear< InputT >::add_scaled(), shark::QpMcLinear< InputT >::m_classes, and shark::QpMcLinear< InputT >::m_data.