Machine Learning Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CSVMLight< Type > Class Template Reference

Wrapper for SVMLight library written by T. Joachims .... More...

#include <CSVMLight.h>

Inheritance diagram for CSVMLight< Type >:

Public Member Functions

 CSVMLight ()
 Constructor. More...
 
 ~CSVMLight ()
 Destructor. More...
 
void train (const CDataset< Type > &rtDs)
 
void classify (const CVector< Type > &, Type &, Type &) const
 
void setKernel (CKernel< Type > *ptKernel)
 Set kernel object. More...
 
void setCacheSize (int iSize)
 Set size if cache in MByte. More...
 
void setMaxQPSize (int iSize)
 Set maximal size of quadratic program (>=2) More...
 
void setRegularization (Type tC)
 Set regularization value. More...
 
void setCalibrationFolds (int iFolds)
 Set number of calibration folds. More...
 
void setMaxTerminationError (Type tError)
 Set maximal termination error. More...
 
void setCostPositiveFactor (Type tCost)
 Set cost factor, by which error on postive items outweight errors for negative items. More...
 
CSVMModel< Type > getModel () const
 Get model of trained svm. More...
 
void setCalibratedOutput (bool bSwitch)
 Activate output calibration. More...
 
const CKernel< Type > * kernel ()
 
bool serialize2 (CArchiv &)
 
int classify (const CVector< Type > &) const
 
string className () const
 
bool isA (const char *acClass) const
 

Protected Member Functions

void solveQP (const CDataset< Type > &rtDs)
 
bool calibrate (CDenseVector< double > tIsPositive, CDenseVector< double > tConfidence, Type &tSigmoidA, Type &tSigmoidB)
 

Protected Attributes

vector< CSVCandidate< Type > > m_tSupportVectors
 
Type m_tBias
 
Type m_tC
 
Type m_tEpsilon
 
Type m_tPositiveCost
 
Type m_tSigmoidA
 
Type m_tSigmoidB
 
int m_iCacheSize
 
int m_iMaxQPSize
 
int m_iCalibrationFolds
 
bool m_bCalibrated
 
bool m_bLinearCached
 
CKernel< Type > * m_ptKernel
 
CDenseVector< Type > m_tWeight
 

Detailed Description

template<class Type>
class CSVMLight< Type >

Wrapper for SVMLight library written by T. Joachims ....

Constructor & Destructor Documentation

template<class Type >
CSVMLight< Type >::CSVMLight ( )

Constructor.

template<class Type >
CSVMLight< Type >::~CSVMLight ( )

Destructor.

Member Function Documentation

template<class Type >
bool CSVMLight< Type >::calibrate ( CDenseVector< double >  tIsPositive,
CDenseVector< double >  tConfidence,
Type &  tSigmoidA,
Type &  tSigmoidB 
)
protected
template<class Type >
void CSVMLight< Type >::classify ( const CVector< Type > &  ,
Type &  ,
Type &   
) const
template<class Type >
int CSVMLight< Type >::classify ( const CVector< Type > &  ) const
template<class Type >
string CSVMLight< Type >::className ( ) const
inline
template<class Type >
CSVMModel<Type> CSVMLight< Type >::getModel ( ) const

Get model of trained svm.

template<class Type >
bool CSVMLight< Type >::isA ( const char *  acClass) const
inline
template<class Type >
const CKernel<Type>* CSVMLight< Type >::kernel ( )
inline
template<class Type >
bool CSVMLight< Type >::serialize2 ( CArchiv )
template<class Type >
void CSVMLight< Type >::setCacheSize ( int  iSize)

Set size if cache in MByte.

template<class Type >
void CSVMLight< Type >::setCalibratedOutput ( bool  bSwitch)

Activate output calibration.

template<class Type >
void CSVMLight< Type >::setCalibrationFolds ( int  iFolds)

Set number of calibration folds.

template<class Type >
void CSVMLight< Type >::setCostPositiveFactor ( Type  tCost)

Set cost factor, by which error on postive items outweight errors for negative items.

template<class Type >
void CSVMLight< Type >::setKernel ( CKernel< Type > *  ptKernel)

Set kernel object.

template<class Type >
void CSVMLight< Type >::setMaxQPSize ( int  iSize)

Set maximal size of quadratic program (>=2)

template<class Type >
void CSVMLight< Type >::setMaxTerminationError ( Type  tError)

Set maximal termination error.

template<class Type >
void CSVMLight< Type >::setRegularization ( Type  tC)

Set regularization value.

template<class Type >
void CSVMLight< Type >::solveQP ( const CDataset< Type > &  rtDs)
protected
template<class Type >
void CSVMLight< Type >::train ( const CDataset< Type > &  rtDs)

Member Data Documentation

template<class Type >
bool CSVMLight< Type >::m_bCalibrated
protected
template<class Type >
bool CSVMLight< Type >::m_bLinearCached
protected
template<class Type >
int CSVMLight< Type >::m_iCacheSize
protected
template<class Type >
int CSVMLight< Type >::m_iCalibrationFolds
protected
template<class Type >
int CSVMLight< Type >::m_iMaxQPSize
protected
template<class Type >
CKernel<Type>* CSVMLight< Type >::m_ptKernel
protected
template<class Type >
Type CSVMLight< Type >::m_tBias
protected
template<class Type >
Type CSVMLight< Type >::m_tC
protected
template<class Type >
Type CSVMLight< Type >::m_tEpsilon
protected
template<class Type >
Type CSVMLight< Type >::m_tPositiveCost
protected
template<class Type >
Type CSVMLight< Type >::m_tSigmoidA
protected
template<class Type >
Type CSVMLight< Type >::m_tSigmoidB
protected
template<class Type >
vector< CSVCandidate<Type> > CSVMLight< Type >::m_tSupportVectors
protected
template<class Type >
CDenseVector<Type> CSVMLight< Type >::m_tWeight
protected

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