#include <DLSVMClassifier.h>
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) |
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:
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.
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.
int DLSVMClassifier::batchTraining | ( | vector< vector< double > > | data, | |
vector< int > | dataclass | |||
) |
Batch training using the data and ground truth supplied
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. |
vector< vector< double > > DLSVMClassifier::batchTesting | ( | vector< vector< double > > | data, | |
vector< int > | dataclass | |||
) |
Batch testing for evaluation using the data and ground truth supplied
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. |
int DLSVMClassifier::test | ( | vector< double > | testdata | ) |
Perform classification on a novel pattern represented by the vector of test data using the current model
testdata | the test data correponding to the novel pattern to be classified using the current model |
int DLSVMClassifier::saveConfusionMatrix | ( | string | strFileName | ) |
Save the confusion matrix in the specified file
strFileName | name of the file to be used to store the confusion matrix |