ARLK: ARLK::SVMClassifier Class Reference
ARLK::SVMClassifier Class Reference

#include <SVMClassifier.h>

Inheritance diagram for ARLK::SVMClassifier:
ARLK::BaseClassifier

Public Member Functions

 SVMClassifier ()
 
 ~SVMClassifier ()
 
void SetSVMParameters (double C, double gamma, double weight)
 
virtual bool FeatureExtraction (SkeData *inputData, const double *dataLabels=NULL, int labelNum=0)
 
virtual bool train ()
 Create the svm model and save it as svm_model.
 
virtual double * predict (SkeData *inputData, int *pLength)
 
virtual void CleanData ()
 Clean all the data except parameters and set data number to 0.
 
- Public Member Functions inherited from ARLK::BaseClassifier
 BaseClassifier ()
 
 ~BaseClassifier ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ARLK::BaseClassifier
static int ** genConfusionMatrix (double *predictedLabels, double *trueLabels, int num, int labelTypeNum)
 
- Static Protected Member Functions inherited from ARLK::BaseClassifier
static bool CalFeatureVector (SkeData *inputData, int frameIdx, int vecIdx, FEATURE_VEC *pSkdPointOut, double wt)
 
- Protected Attributes inherited from ARLK::BaseClassifier
int dataNum
 Number of the data.
 
double * labels
 
double actWeight
 

Constructor & Destructor Documentation

ARLK::SVMClassifier::SVMClassifier ( )
ARLK::SVMClassifier::~SVMClassifier ( )

Member Function Documentation

void ARLK::SVMClassifier::CleanData ( )
virtual

Clean all the data except parameters and set data number to 0.

Reimplemented from ARLK::BaseClassifier.

bool ARLK::SVMClassifier::FeatureExtraction ( SkeData inputData,
const double *  dataLabels = NULL,
int  labelNum = 0 
)
virtual

Extract features from SkeData

Parameters
[in]inputDataSkeData containing all training data information
[in]dataLabelsAn array containing the data labels for each training data
[in]labelNumNumber of labels/training data
Returns
True if succeeds

Reimplemented from ARLK::BaseClassifier.

double * ARLK::SVMClassifier::predict ( SkeData inputData,
int *  pLength 
)
virtual

Classify the data in inputData, store the results in the buffer pointed by labelBuf

Parameters
[in]inputDataSkeData containing all test data information
[out]pLengthPointer to the integer indicating the length of the buffer of the predicted labels
Returns
A pointer to the buffer containing the predicted double labels, should be deleted by the user

Reimplemented from ARLK::BaseClassifier.

void ARLK::SVMClassifier::SetSVMParameters ( double  C,
double  gamma,
double  weight 
)

Set SVM training parameters By default, C = 10, gamma = 0.001, weight = 3

Parameters
[in]CSVM training parameter C in svm_parameter
[in]gammaSVM training parameter gamma in svm_parameter
[in]weightFactor of the action features
bool ARLK::SVMClassifier::train ( )
virtual

Create the svm model and save it as svm_model.

Reimplemented from ARLK::BaseClassifier.


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