Problem formulation for binary C-SVM problems. More...
#include <shark/Algorithms/QP/QpSolver.h>
Public Types | |
typedef MatrixT | MatrixType |
typedef MatrixType::QpFloatType | QpFloatType |
Public Member Functions | |
CSVMProblem (MatrixType &quadratic, Data< unsigned int > const &labels, double C) | |
Setup only using kernel matrix, labels and regularization parameter. More... | |
CSVMProblem (MatrixType &quadratic, Data< unsigned int > const &labels, RealVector const ®ularizers) | |
Setup using kernel matrix, labels and different regularization parameters for positive and negative classes. More... | |
CSVMProblem (MatrixType &quadratic, RealVector linear, Data< unsigned int > const &labels, double C) | |
std::size_t | dimensions () const |
double | boxMin (std::size_t i) const |
double | boxMax (std::size_t i) const |
void | flipCoordinates (std::size_t i, std::size_t j) |
exchange two variables via the permutation More... | |
void | scaleBoxConstraints (double factor, double variableScalingFactor) |
Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor. More... | |
Public Attributes | |
MatrixType & | quadratic |
representation of the quadratic part of the objective function More... | |
RealVector | linear |
Linear part of the problem. More... | |
RealVector | alpha |
Solution candidate. More... | |
RealVector | diagonal |
std::vector< std::size_t > | permutation |
permutation of the variables alpha, gradient, etc. More... | |
Problem formulation for binary C-SVM problems.
max_ - 1/2 ^T K + ^Ty under constraints: l_i <= <= u_i = 0
Definition at line 246 of file QpSolver.h.
typedef MatrixT shark::CSVMProblem< MatrixT >::MatrixType |
Definition at line 248 of file QpSolver.h.
typedef MatrixType::QpFloatType shark::CSVMProblem< MatrixT >::QpFloatType |
Definition at line 249 of file QpSolver.h.
|
inline |
Setup only using kernel matrix, labels and regularization parameter.
Definition at line 252 of file QpSolver.h.
References shark::GeneralQuadraticProblem< MatrixT >::diagonal, shark::GeneralQuadraticProblem< MatrixT >::dimensions(), shark::Data< Type >::element(), shark::GeneralQuadraticProblem< MatrixT >::linear, shark::Data< Type >::numberOfElements(), shark::GeneralQuadraticProblem< MatrixT >::permutation, and SIZE_CHECK.
|
inline |
Setup using kernel matrix, labels and different regularization parameters for positive and negative classes.
Definition at line 274 of file QpSolver.h.
References shark::GeneralQuadraticProblem< MatrixT >::diagonal, shark::GeneralQuadraticProblem< MatrixT >::dimensions(), shark::Data< Type >::element(), shark::GeneralQuadraticProblem< MatrixT >::linear, shark::Data< Type >::numberOfElements(), shark::GeneralQuadraticProblem< MatrixT >::permutation, and SIZE_CHECK.
|
inline |
Definition at line 302 of file QpSolver.h.
References shark::GeneralQuadraticProblem< MatrixT >::diagonal, shark::GeneralQuadraticProblem< MatrixT >::dimensions(), shark::Data< Type >::element(), shark::Data< Type >::numberOfElements(), shark::GeneralQuadraticProblem< MatrixT >::permutation, and SIZE_CHECK.
|
inline |
Definition at line 330 of file QpSolver.h.
|
inline |
Definition at line 327 of file QpSolver.h.
|
inline |
Definition at line 323 of file QpSolver.h.
References shark::GeneralQuadraticProblem< MatrixT >::quadratic.
|
inline |
exchange two variables via the permutation
Definition at line 351 of file QpSolver.h.
References shark::swap().
|
inline |
Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor.
Definition at line 365 of file QpSolver.h.
References shark::GeneralQuadraticProblem< MatrixT >::alpha, and shark::GeneralQuadraticProblem< MatrixT >::dimensions().
RealVector shark::CSVMProblem< MatrixT >::alpha |
Solution candidate.
Definition at line 341 of file QpSolver.h.
RealVector shark::CSVMProblem< MatrixT >::diagonal |
diagonal matrix entries The diagonal array is of fixed size and not subject to shrinking.
Definition at line 345 of file QpSolver.h.
RealVector shark::CSVMProblem< MatrixT >::linear |
Linear part of the problem.
Definition at line 338 of file QpSolver.h.
std::vector<std::size_t> shark::CSVMProblem< MatrixT >::permutation |
permutation of the variables alpha, gradient, etc.
Definition at line 348 of file QpSolver.h.
MatrixType& shark::CSVMProblem< MatrixT >::quadratic |
representation of the quadratic part of the objective function
Definition at line 335 of file QpSolver.h.