shark::QpConfig Class Reference

Super class of all support vector machine trainers. More...

#include <shark/Algorithms/Trainers/AbstractSvmTrainer.h>

+ Inheritance diagram for shark::QpConfig:

Public Member Functions

 QpConfig (bool precomputedFlag=false, bool sparsifyFlag=true)
 Constructor.
 
QpStoppingConditionstoppingCondition ()
 Read/write access to the stopping condition.
 
QpStoppingCondition const & stoppingCondition () const
 Read access to the stopping condition.
 
QpSolutionPropertiessolutionProperties ()
 Access to the solution properties.
 
bool & precomputeKernel ()
 Flag for using a precomputed kernel matrix.
 
bool const & precomputeKernel () const
 Flag for using a precomputed kernel matrix.
 
bool & sparsify ()
 Flag for sparsifying the model after training.
 
bool const & sparsify () const
 Flag for sparsifying the model after training.
 
bool & shrinking ()
 Flag for shrinking in the decomposition solver.
 
bool const & shrinking () const
 Flag for shrinking in the decomposition solver.
 
bool & s2do ()
 Flag for S2DO (instead of SMO)
 
bool const & s2do () const
 Flag for S2DO (instead of SMO)
 
unsigned int & verbosity ()
 Verbosity level of the solver.
 
unsigned int const & verbosity () const
 Verbosity level of the solver.
 
unsigned long long const & accessCount () const
 Number of kernel accesses.
 
void setMinAccuracy (double a)
 
void setMaxIterations (unsigned long long i)
 
void setTargetValue (double v)
 
void setMaxSeconds (double s)
 

Protected Attributes

QpStoppingCondition m_stoppingcondition
 conditions for when to stop the QP solver
 
QpSolutionProperties m_solutionproperties
 properties of the approximate solution found by the solver
 
bool m_precomputedKernelMatrix
 should the solver use a precomputed kernel matrix?
 
bool m_sparsify
 should the trainer sparsify the model after training?
 
bool m_shrinking
 should shrinking be used?
 
bool m_s2do
 should S2DO be used instead of SMO?
 
unsigned int m_verbosity
 verbosity level (currently unused)
 
unsigned long long m_accessCount
 kernel access count
 

Detailed Description

Super class of all support vector machine trainers.

The QpConfig class holds two structures describing the stopping condition and the solution obtained by the underlying quadratic programming solvers. It provides a uniform interface for setting, e.g., the target solution accuracy and obtaining the accuracy of the actual solution.

Definition at line 71 of file AbstractSvmTrainer.h.

Constructor & Destructor Documentation

◆ QpConfig()

shark::QpConfig::QpConfig ( bool  precomputedFlag = false,
bool  sparsifyFlag = true 
)
inline

Constructor.

Definition at line 75 of file AbstractSvmTrainer.h.

Member Function Documentation

◆ accessCount()

unsigned long long const & shark::QpConfig::accessCount ( ) const
inline

Number of kernel accesses.

Definition at line 137 of file AbstractSvmTrainer.h.

References m_accessCount.

◆ precomputeKernel() [1/2]

◆ precomputeKernel() [2/2]

bool const & shark::QpConfig::precomputeKernel ( ) const
inline

Flag for using a precomputed kernel matrix.

Definition at line 101 of file AbstractSvmTrainer.h.

References m_precomputedKernelMatrix.

◆ s2do() [1/2]

bool & shark::QpConfig::s2do ( )
inline

Flag for S2DO (instead of SMO)

Definition at line 121 of file AbstractSvmTrainer.h.

References m_s2do.

◆ s2do() [2/2]

bool const & shark::QpConfig::s2do ( ) const
inline

Flag for S2DO (instead of SMO)

Definition at line 125 of file AbstractSvmTrainer.h.

References m_s2do.

◆ setMaxIterations()

void shark::QpConfig::setMaxIterations ( unsigned long long  i)
inline

◆ setMaxSeconds()

void shark::QpConfig::setMaxSeconds ( double  s)
inline

◆ setMinAccuracy()

void shark::QpConfig::setMinAccuracy ( double  a)
inline

◆ setTargetValue()

void shark::QpConfig::setTargetValue ( double  v)
inline

◆ shrinking() [1/2]

bool & shark::QpConfig::shrinking ( )
inline

Flag for shrinking in the decomposition solver.

Definition at line 113 of file AbstractSvmTrainer.h.

References m_shrinking.

◆ shrinking() [2/2]

bool const & shark::QpConfig::shrinking ( ) const
inline

Flag for shrinking in the decomposition solver.

Definition at line 117 of file AbstractSvmTrainer.h.

References m_shrinking.

◆ solutionProperties()

QpSolutionProperties & shark::QpConfig::solutionProperties ( )
inline

◆ sparsify() [1/2]

◆ sparsify() [2/2]

bool const & shark::QpConfig::sparsify ( ) const
inline

Flag for sparsifying the model after training.

Definition at line 109 of file AbstractSvmTrainer.h.

References m_sparsify.

◆ stoppingCondition() [1/2]

◆ stoppingCondition() [2/2]

QpStoppingCondition const & shark::QpConfig::stoppingCondition ( ) const
inline

Read access to the stopping condition.

Definition at line 89 of file AbstractSvmTrainer.h.

References m_stoppingcondition.

◆ verbosity() [1/2]

unsigned int & shark::QpConfig::verbosity ( )
inline

Verbosity level of the solver.

Definition at line 129 of file AbstractSvmTrainer.h.

References m_verbosity.

Referenced by shark::SquaredHingeLinearCSvmTrainer< InputType >::train().

◆ verbosity() [2/2]

unsigned int const & shark::QpConfig::verbosity ( ) const
inline

Verbosity level of the solver.

Definition at line 133 of file AbstractSvmTrainer.h.

References m_verbosity.

Member Data Documentation

◆ m_accessCount

unsigned long long shark::QpConfig::m_accessCount
protected

◆ m_precomputedKernelMatrix

bool shark::QpConfig::m_precomputedKernelMatrix
protected

should the solver use a precomputed kernel matrix?

Definition at line 155 of file AbstractSvmTrainer.h.

Referenced by precomputeKernel(), and precomputeKernel().

◆ m_s2do

bool shark::QpConfig::m_s2do
protected

should S2DO be used instead of SMO?

Definition at line 161 of file AbstractSvmTrainer.h.

Referenced by s2do(), and s2do().

◆ m_shrinking

bool shark::QpConfig::m_shrinking
protected

should shrinking be used?

Definition at line 159 of file AbstractSvmTrainer.h.

Referenced by shrinking(), shrinking(), and shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM().

◆ m_solutionproperties

QpSolutionProperties shark::QpConfig::m_solutionproperties
protected

properties of the approximate solution found by the solver

Definition at line 153 of file AbstractSvmTrainer.h.

Referenced by solutionProperties().

◆ m_sparsify

bool shark::QpConfig::m_sparsify
protected

should the trainer sparsify the model after training?

Definition at line 157 of file AbstractSvmTrainer.h.

Referenced by sparsify(), and sparsify().

◆ m_stoppingcondition

QpStoppingCondition shark::QpConfig::m_stoppingcondition
protected

conditions for when to stop the QP solver

Definition at line 151 of file AbstractSvmTrainer.h.

Referenced by setMaxIterations(), setMaxSeconds(), setMinAccuracy(), setTargetValue(), stoppingCondition(), and stoppingCondition().

◆ m_verbosity

unsigned int shark::QpConfig::m_verbosity
protected

verbosity level (currently unused)

Definition at line 163 of file AbstractSvmTrainer.h.

Referenced by verbosity(), and verbosity().


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