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. More...
 
QpStoppingConditionstoppingCondition ()
 Read/write access to the stopping condition. More...
 
QpStoppingCondition const & stoppingCondition () const
 Read access to the stopping condition. More...
 
QpSolutionPropertiessolutionProperties ()
 Access to the solution properties. More...
 
bool & precomputeKernel ()
 Flag for using a precomputed kernel matrix. More...
 
bool const & precomputeKernel () const
 Flag for using a precomputed kernel matrix. More...
 
bool & sparsify ()
 Flag for sparsifying the model after training. More...
 
bool const & sparsify () const
 Flag for sparsifying the model after training. More...
 
bool & shrinking ()
 Flag for shrinking in the decomposition solver. More...
 
bool const & shrinking () const
 Flag for shrinking in the decomposition solver. More...
 
bool & s2do ()
 Flag for S2DO (instead of SMO) More...
 
bool const & s2do () const
 Flag for S2DO (instead of SMO) More...
 
unsigned int & verbosity ()
 Verbosity level of the solver. More...
 
unsigned int const & verbosity () const
 Verbosity level of the solver. More...
 
unsigned long long const & accessCount () const
 Number of kernel accesses. More...
 
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 More...
 
QpSolutionProperties m_solutionproperties
 properties of the approximate solution found by the solver More...
 
bool m_precomputedKernelMatrix
 should the solver use a precomputed kernel matrix? More...
 
bool m_sparsify
 should the trainer sparsify the model after training? More...
 
bool m_shrinking
 should shrinking be used? More...
 
bool m_s2do
 should S2DO be used instead of SMO? More...
 
unsigned int m_verbosity
 verbosity level (currently unused) More...
 
unsigned long long m_accessCount
 kernel access count More...
 

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.

Referenced by shark::CSvmTrainer< InputType, CacheType >::get_db_dParams().

◆ 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.

Referenced by shark::CSvmTrainer< InputType, CacheType >::get_db_dParams().

◆ 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()

◆ sparsify() [1/2]

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

◆ 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() [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

kernel access count

Definition at line 165 of file AbstractSvmTrainer.h.

Referenced by accessCount().

◆ 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().

◆ 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().

◆ m_shrinking

◆ 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 shark::AbstractLinearSvmTrainer< InputType >::numberOfParameters(), and 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().

◆ m_stoppingcondition

QpStoppingCondition shark::QpConfig::m_stoppingcondition
protected

◆ m_verbosity

unsigned int shark::QpConfig::m_verbosity
protected

verbosity level (currently unused)

Definition at line 163 of file AbstractSvmTrainer.h.

Referenced by shark::AbstractLinearSvmTrainer< InputType >::numberOfParameters(), and verbosity().


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