#include <shark/Algorithms/Trainers/CSvmTrainer.h>
Public Member Functions | |
LinearCSvmTrainer (double C, bool offset, bool unconstrained=false) | |
std::string | name () const |
From INameable: return the class name. More... | |
void | setMcSvmType (McSvm type) |
sets the type of the multi-class svm used More... | |
void | train (LinearClassifier< InputType > &model, LabeledData< InputType, unsigned int > const &dataset) |
Public Member Functions inherited from shark::AbstractLinearSvmTrainer< InputType > | |
AbstractLinearSvmTrainer (double C, bool offset, bool unconstrained) | |
double | C () const |
Return the value of the regularization parameter C. More... | |
void | setC (double C) |
Set the value of the regularization parameter C. More... | |
bool | isUnconstrained () const |
Is the regularization parameter provided in logarithmic (unconstrained) form as a parameter? More... | |
bool | trainOffset () const |
RealVector | parameterVector () const |
Get the hyper-parameter vector. More... | |
void | setParameterVector (RealVector const &newParameters) |
Set the vector of hyper-parameters. More... | |
size_t | numberOfParameters () const |
Return the number of hyper-parameters. More... | |
Public Member Functions inherited from shark::AbstractTrainer< LinearClassifier< InputType >, unsigned int > | |
virtual void | train (ModelType &model, DatasetType const &dataset)=0 |
Core of the Trainer interface. More... | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
virtual void | read (InArchive &archive) |
Read the component from the supplied archive. More... | |
virtual void | write (OutArchive &archive) const |
Write the component to the supplied archive. More... | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). More... | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). More... | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Public Member Functions inherited from shark::QpConfig | |
QpConfig (bool precomputedFlag=false, bool sparsifyFlag=true) | |
Constructor. More... | |
QpStoppingCondition & | stoppingCondition () |
Read/write access to the stopping condition. More... | |
QpStoppingCondition const & | stoppingCondition () const |
Read access to the stopping condition. More... | |
QpSolutionProperties & | solutionProperties () |
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) |
Public Member Functions inherited from shark::IParameterizable<> | |
virtual | ~IParameterizable () |
Additional Inherited Members | |
Public Types inherited from shark::AbstractLinearSvmTrainer< InputType > | |
typedef LinearClassifier< InputType > | ModelType |
Public Types inherited from shark::AbstractTrainer< LinearClassifier< InputType >, unsigned int > | |
typedef LinearClassifier< InputType > | ModelType |
typedef ModelType::InputType | InputType |
typedef unsigned int | LabelType |
typedef LabeledData< InputType, LabelType > | DatasetType |
Public Types inherited from shark::IParameterizable<> | |
typedef RealVector | ParameterVectorType |
Protected Attributes inherited from shark::AbstractLinearSvmTrainer< InputType > | |
double | m_C |
Regularization parameter. The exact meaning depends on the sub-class, but the value is always positive, and higher implies a less regular solution. More... | |
bool | m_trainOffset |
Is the SVM trained with or without bias? More... | |
bool | m_unconstrained |
Is log(C) stored internally as a parameter instead of C? If yes, then we get rid of the constraint C > 0 on the level of the parameter interface. More... | |
Protected Attributes inherited from shark::QpConfig | |
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... | |
Definition at line 798 of file CSvmTrainer.h.
|
inline |
Definition at line 803 of file CSvmTrainer.h.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 807 of file CSvmTrainer.h.
Referenced by main().
|
inline |
sets the type of the multi-class svm used
Definition at line 811 of file CSvmTrainer.h.
Referenced by main().
|
inline |
Definition at line 815 of file CSvmTrainer.h.
References shark::ADM, shark::ATM, shark::ATS, shark::CS, shark::inputDimension(), shark::LLW, shark::MMR, shark::numberOfClasses(), shark::OVA, shark::ReinforcedSvm, shark::QpConfig::solutionProperties(), shark::QpBoxLinear< InputT >::solve(), shark::QpConfig::stoppingCondition(), shark::QpConfig::verbosity(), w, and shark::WW.
Referenced by main().