#include <shark/Algorithms/Trainers/CSvmTrainer.h>
 Inheritance diagram for shark::SquaredHingeCSvmTrainer< InputType, CacheType >:
 Inheritance diagram for shark::SquaredHingeCSvmTrainer< InputType, CacheType >:| Public Types | |
| typedef CacheType | QpFloatType | 
| typedef RegularizedKernelMatrix< InputType, QpFloatType > | KernelMatrixType | 
| typedef CachedMatrix< KernelMatrixType > | CachedMatrixType | 
| typedef PrecomputedMatrix< KernelMatrixType > | PrecomputedMatrixType | 
| typedef AbstractModel< InputType, RealVector > | ModelType | 
| typedef AbstractKernelFunction< InputType > | KernelType | 
|  Public Types inherited from shark::AbstractSvmTrainer< InputType, unsigned int > | |
| typedef AbstractKernelFunction< InputType > | KernelType | 
|  Public Types inherited from shark::AbstractTrainer< Model, LabelTypeT > | |
| typedef Model | ModelType | 
| typedef ModelType::InputType | InputType | 
| typedef LabelTypeT | LabelType | 
| typedef LabeledData< InputType, LabelType > | DatasetType | 
|  Public Types inherited from shark::IParameterizable< VectorType > | |
| typedef VectorType | ParameterVectorType | 
| Public Member Functions | |
| SquaredHingeCSvmTrainer (KernelType *kernel, double C, bool unconstrained=false) | |
| SquaredHingeCSvmTrainer (KernelType *kernel, double negativeC, double positiveC, bool unconstrained=false) | |
| std::string | name () const | 
| From INameable: return the class name. | |
| void | train (KernelClassifier< InputType > &svm, LabeledData< InputType, unsigned int > const &dataset) | 
| Train the C-SVM. | |
|  Public Member Functions inherited from shark::AbstractSvmTrainer< InputType, unsigned int > | |
| AbstractSvmTrainer (KernelType *kernel, double C, bool offset, bool unconstrained=false) | |
| AbstractSvmTrainer (KernelType *kernel, double negativeC, double positiveC, bool offset, bool unconstrained=false) | |
| double | C () const | 
| Return the value of the regularization parameter C. | |
| void | setC (double C) | 
| Set the value of the regularization parameter C. | |
| RealVector const & | regularizationParameters () const | 
| void | setRegularizationParameters (RealVector const ®ularizers) | 
| Set the value of the regularization parameter C. | |
| KernelType * | kernel () | 
| KernelType const * | kernel () const | 
| void | setKernel (KernelType *kernel) | 
| bool | isUnconstrained () const | 
| bool | trainOffset () const | 
| std::size_t | cacheSize () const | 
| void | setCacheSize (std::size_t size) | 
| RealVector | parameterVector () const | 
| get the hyper-parameter vector | |
| void | setParameterVector (RealVector const &newParameters) | 
| set the vector of hyper-parameters | |
| size_t | numberOfParameters () const | 
| return the number of hyper-parameters | |
|  Public Member Functions inherited from shark::AbstractTrainer< Model, LabelTypeT > | |
| virtual void | train (ModelType &model, DatasetType const &dataset)=0 | 
| Core of the Trainer interface. | |
|  Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () | 
|  Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () | 
| Virtual d'tor. | |
| virtual void | read (InArchive &archive) | 
| Read the component from the supplied archive. | |
| virtual void | write (OutArchive &archive) const | 
| Write the component to the supplied archive. | |
| void | load (InArchive &archive, unsigned int version) | 
| Versioned loading of components, calls read(...). | |
| void | save (OutArchive &archive, unsigned int version) const | 
| Versioned storing of components, calls write(...). | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
|  Public Member Functions inherited from shark::QpConfig | |
| QpConfig (bool precomputedFlag=false, bool sparsifyFlag=true) | |
| Constructor. | |
| QpStoppingCondition & | stoppingCondition () | 
| Read/write access to the stopping condition. | |
| QpStoppingCondition const & | stoppingCondition () const | 
| Read access to the stopping condition. | |
| QpSolutionProperties & | solutionProperties () | 
| 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) | 
|  Public Member Functions inherited from shark::IParameterizable< VectorType > | |
| virtual | ~IParameterizable () | 
| Additional Inherited Members | |
|  Protected Attributes inherited from shark::AbstractSvmTrainer< InputType, unsigned int > | |
| KernelType * | m_kernel | 
| RealVector | m_regularizers | 
| Vector of regularization parameters. | |
| bool | m_trainOffset | 
| 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. | |
| std::size_t | m_cacheSize | 
| Number of values in the kernel cache. The size of the cache in bytes is the size of one entry (4 for float, 8 for double) times this number. | |
|  Protected Attributes inherited from shark::QpConfig | |
| 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 | |
Definition at line 936 of file CSvmTrainer.h.
| typedef CachedMatrix< KernelMatrixType > shark::SquaredHingeCSvmTrainer< InputType, CacheType >::CachedMatrixType | 
Definition at line 942 of file CSvmTrainer.h.
| typedef RegularizedKernelMatrix<InputType, QpFloatType> shark::SquaredHingeCSvmTrainer< InputType, CacheType >::KernelMatrixType | 
Definition at line 941 of file CSvmTrainer.h.
| typedef AbstractKernelFunction<InputType> shark::SquaredHingeCSvmTrainer< InputType, CacheType >::KernelType | 
Definition at line 946 of file CSvmTrainer.h.
| typedef AbstractModel<InputType, RealVector> shark::SquaredHingeCSvmTrainer< InputType, CacheType >::ModelType | 
Definition at line 945 of file CSvmTrainer.h.
| typedef PrecomputedMatrix< KernelMatrixType > shark::SquaredHingeCSvmTrainer< InputType, CacheType >::PrecomputedMatrixType | 
Definition at line 943 of file CSvmTrainer.h.
| typedef CacheType shark::SquaredHingeCSvmTrainer< InputType, CacheType >::QpFloatType | 
Definition at line 939 of file CSvmTrainer.h.
| 
 | inline | 
Constructor
| kernel | kernel function to use for training and prediction | 
| C | regularization parameter - always the 'true' value of C, even when unconstrained is set | 
| unconstrained | when a C-value is given via setParameter, should it be piped through the exp-function before using it in the solver?? | 
Definition at line 953 of file CSvmTrainer.h.
| 
 | inline | 
Constructor
| kernel | kernel function to use for training and prediction | 
| negativeC | regularization parameter of the negative class (label 0) | 
| positiveC | regularization parameter of the positive class (label 1) | 
| unconstrained | when a C-value is given via setParameter, should it be piped through the exp-function before using it in the solver? | 
Definition at line 962 of file CSvmTrainer.h.
| 
 | inlinevirtual | 
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 967 of file CSvmTrainer.h.
| 
 | inline | 
Train the C-SVM.
Definition at line 971 of file CSvmTrainer.h.
References shark::Classifier< Model >::decisionFunction(), shark::LabeledData< InputT, LabelT >::element(), shark::RegularizedKernelMatrix< InputType, CacheType >::getAccessCount(), shark::LabeledData< InputT, LabelT >::inputs(), shark::QpConfig::m_accessCount, shark::AbstractSvmTrainer< InputType, unsigned int >::m_kernel, shark::AbstractSvmTrainer< InputType, unsigned int >::m_regularizers, shark::LabeledData< InputT, LabelT >::numberOfElements(), shark::QpConfig::precomputeKernel(), and shark::QpConfig::sparsify().