DLSVMClassifier Class Reference

The DLSVMClassifier object is a wrapper class that provides an easy-to-use interface for the original C implementation of LIBSVM. In addition, it include member functions for batch training and test. More...

#include <DLSVMClassifier.h>

List of all members.

Public Member Functions

 DLSVMClassifier ()
 DLSVMClassifier (string model_filename, bool bTesting=true)
 ~DLSVMClassifier ()
int batchTraining (vector< vector< double > > data, vector< int > dataclass)
vector< vector
< double > > 
batchTesting (vector< vector< double > > data, vector< int > dataclass)
int test (vector< double > testdata)
int saveConfusionMatrix (string strFileName)


Detailed Description

The DLSVMClassifier object is a wrapper class that provides an easy-to-use interface for the original C implementation of LIBSVM. In addition, it include member functions for batch training and test.

LIBSVM is an integrated library for multi-class support vector classification (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM). The LIBSVM code here is based on LIBSVM release v2.85. Please see the LIBSVM website at http://www.csie.ntu.edu.tw/~cjlin/libsvm/ for documentations and updates.

Features currently supported in this verison of LIBSVM library include:


Constructor & Destructor Documentation

DLSVMClassifier::DLSVMClassifier (  ) 

Default DLSVMClassifier Constructor.

DLSVMClassifier::DLSVMClassifier ( string  model_filename,
bool  bTesting = true 
)

DLSVMClassifier Constructor: Initialize SVM parameters and perform either training or test based on the input parameters In training, a new model file in LIBSVM format will be created by the given file name. In testing, the specified model file in LIBSVM format will be used for classification.

Parameters:
model_filename file name of the SVM model file in LIBSVM format.
bTesting boolean indicator. True for testing; False for training.

DLSVMClassifier::~DLSVMClassifier (  ) 

Default DLSVMClassifier Destructor: Free memory for LIBSVM.


Member Function Documentation

int DLSVMClassifier::batchTraining ( vector< vector< double > >  data,
vector< int >  dataclass 
)

Batch training using the data and ground truth supplied

Parameters:
data input training data in the form of vector of vector. The dimension of data must match the lengths of ground truth class labels.
dataclass ground truth information of the true class label of the data. Each class label must be distinct integer values.
Returns:
1 if successful

vector< vector< double > > DLSVMClassifier::batchTesting ( vector< vector< double > >  data,
vector< int >  dataclass 
)

Batch testing for evaluation using the data and ground truth supplied

Parameters:
data input test data in the form of vector of vector. The dimension of data must match the lengths of ground truth class labels.
dataclass ground truth information of the true class label of the data. Each class label must be distinct integer values.
Returns:
entries in the confusion matrix in the form of vector of vector.

int DLSVMClassifier::test ( vector< double >  testdata  ) 

Perform classification on a novel pattern represented by the vector of test data using the current model

Parameters:
testdata the test data correponding to the novel pattern to be classified using the current model
Returns:
the predicted class label of the test data using the current model

int DLSVMClassifier::saveConfusionMatrix ( string  strFileName  ) 

Save the confusion matrix in the specified file

Parameters:
strFileName name of the file to be used to store the confusion matrix
Returns:
1 if successful


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

DocIDDOCLIB Library is an add-on of DOCLIB. DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007