ARLK: ARLK::BaseClassifier Class Reference

#include <BaseClassifier.h>

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

Public Member Functions

 BaseClassifier ()
 
 ~BaseClassifier ()
 
virtual bool FeatureExtraction (SkeData *inputData, const double *dataLabels=NULL, int labelNum=0)
 
virtual bool train ()
 Return true if the training process succeeds.
 
virtual double * predict (SkeData *inputData, int *pLength)
 
virtual void CleanData ()
 Clean all the data except actWeight and set datanum to 0.
 

Static Public Member Functions

static int ** genConfusionMatrix (double *predictedLabels, double *trueLabels, int num, int labelTypeNum)
 

Static Protected Member Functions

static bool CalFeatureVector (SkeData *inputData, int frameIdx, int vecIdx, FEATURE_VEC *pSkdPointOut, double wt)
 

Protected Attributes

int dataNum
 Number of the data.
 
double * labels
 
double actWeight
 

Constructor & Destructor Documentation

ARLK::BaseClassifier::BaseClassifier ( )
ARLK::BaseClassifier::~BaseClassifier ( )

Member Function Documentation

bool ARLK::BaseClassifier::CalFeatureVector ( SkeData inputData,
int  frameIdx,
int  vecIdx,
FEATURE_VEC pSkdPointOut,
double  wt 
)
staticprotected

Calculate a feature vector for one frame.

Parameters
[in]inputDataSkeData containing all training data information
[in]frameIdxFrame index, counting from 1
[in]vecIdxVector index, counting from 1
[out]pSkdPointOutA FEATURE_VEC structure containing the calculated vector
[in]wtWeight of the velocity features
Returns
A bool value, true if succeeds
void ARLK::BaseClassifier::CleanData ( )
virtual

Clean all the data except actWeight and set datanum to 0.

Reimplemented in ARLK::SVMClassifier, and ARLK::KNNClassifier.

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

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 in ARLK::SVMClassifier, and ARLK::KNNClassifier.

int ** ARLK::BaseClassifier::genConfusionMatrix ( double *  predictedLabels,
double *  trueLabels,
int  num,
int  labelTypeNum 
)
static

Generate the confusion matrix according to the predicted results Assuming the label numbers can be casted to integers

Parameters
[in]predictedLabelsA pointer to the buffer containing the predicted labels of the test data
[in]trueLabelsA pointer to the buffer containing the true labels of the test data
[in]numNumber of the test data
[in]labelTypeNumA pointer to a integer containing the number of label types
Returns
A double pointer to the confusion matrix, should be deleted by the user
virtual double* ARLK::BaseClassifier::predict ( SkeData inputData,
int *  pLength 
)
inlinevirtual

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 in ARLK::SVMClassifier, and ARLK::KNNClassifier.

virtual bool ARLK::BaseClassifier::train ( )
inlinevirtual

Return true if the training process succeeds.

Reimplemented in ARLK::SVMClassifier, and ARLK::KNNClassifier.

Member Data Documentation

double ARLK::BaseClassifier::actWeight
protected
int ARLK::BaseClassifier::dataNum
protected

Number of the data.

double* ARLK::BaseClassifier::labels
protected

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