Point Cloud Library (PCL)
1.14.1-dev
|
Base class for SVM SVM (Support Vector Machines). More...
#include <pcl/ml/svm_wrapper.h>
Public Member Functions | |
SVM () | |
Constructor. More... | |
~SVM () | |
Destructor. More... | |
void | getLabel (std::vector< int > &labels) |
Return the labels order from the classifier model. More... | |
void | saveClassifierModel (const char *filename) |
Save the classifier model in an extern file (in svmlight format). More... | |
Protected Member Functions | |
char * | readline (FILE *input) |
To read a line from the input file. More... | |
void | exitInputError (int line_num) |
Outputs an error in file reading. More... | |
const std::string & | getClassName () const |
Get a string representation of the name of this class. More... | |
void | adaptInputToLibSVM (std::vector< SVMData > training_set, svm_problem &prob) |
Convert the input format (vector of SVMData) into a readable format for libSVM. More... | |
void | adaptLibSVMToInput (std::vector< SVMData > &training_set, svm_problem prob) const |
Convert the libSVM format (svm_problem) into a easier output format. More... | |
bool | loadProblem (const char *filename, svm_problem &prob) |
Load a problem from an extern file. More... | |
bool | saveProblem (const char *filename, bool labelled) |
Save the raw problem in an extern file. More... | |
bool | saveProblemNorm (const char *filename, svm_problem prob_, bool labelled) |
Save the problem (with normalized values) in an extern file. More... | |
Static Protected Member Functions | |
static void | printNull (const char *) |
Set for output printings during classification. More... | |
Protected Attributes | |
std::vector< SVMData > | training_set_ |
svm_problem | prob_ |
SVMModel | model_ |
svm_scaling | scaling_ |
SVMParam | param_ |
std::string | class_name_ |
char * | line_ {nullptr} |
int | max_line_len_ {10000} |
bool | labelled_training_set_ |
Base class for SVM SVM (Support Vector Machines).
Definition at line 122 of file svm_wrapper.h.
|
inline |
Constructor.
Definition at line 182 of file svm_wrapper.h.
|
inline |
Destructor.
Definition at line 185 of file svm_wrapper.h.
References svm_problem::l, svm_scaling::max, svm_scaling::obj, param_, prob_, scaling_, svm_problem::x, and svm_problem::y.
|
protected |
Convert the input format (vector of SVMData) into a readable format for libSVM.
Referenced by pcl::SVMClassify::setInputTrainingSet().
|
protected |
Convert the libSVM format (svm_problem) into a easier output format.
Referenced by pcl::SVMClassify::loadClassProblem(), and pcl::SVMClassify::loadNormClassProblem().
|
inlineprotected |
Outputs an error in file reading.
Definition at line 147 of file svm_wrapper.h.
|
inlineprotected |
Get a string representation of the name of this class.
Definition at line 155 of file svm_wrapper.h.
References class_name_.
Referenced by pcl::SVMClassify::setInputTrainingSet().
|
inline |
Return the labels order from the classifier model.
Definition at line 201 of file svm_wrapper.h.
References model_.
|
protected |
Load a problem from an extern file.
Referenced by pcl::SVMClassify::loadClassProblem(), pcl::SVMClassify::loadNormClassProblem(), and pcl::SVMTrain::loadProblem().
|
inlinestaticprotected |
Set for output printings during classification.
Definition at line 139 of file svm_wrapper.h.
Referenced by pcl::SVMTrain::setDebugMode(), and pcl::SVMTrain::SVMTrain().
|
protected |
To read a line from the input file.
Stored in "line_".
|
inline |
Save the classifier model in an extern file (in svmlight format).
Definition at line 215 of file svm_wrapper.h.
References svm_model::l, and model_.
|
protected |
Save the raw problem in an extern file.
Referenced by pcl::SVMClassify::saveClassProblem(), and pcl::SVMTrain::saveTrainingSet().
|
protected |
Save the problem (with normalized values) in an extern file.
Referenced by pcl::SVMClassify::saveNormClassProblem(), and pcl::SVMTrain::saveNormTrainingSet().
|
protected |
Definition at line 130 of file svm_wrapper.h.
Referenced by getClassName().
|
protected |
Definition at line 134 of file svm_wrapper.h.
|
protected |
Definition at line 132 of file svm_wrapper.h.
|
protected |
Definition at line 133 of file svm_wrapper.h.
|
protected |
Definition at line 126 of file svm_wrapper.h.
Referenced by getLabel(), and saveClassifierModel().
|
protected |
Definition at line 129 of file svm_wrapper.h.
Referenced by ~SVM().
|
protected |
Definition at line 125 of file svm_wrapper.h.
Referenced by ~SVM().
|
protected |
Definition at line 127 of file svm_wrapper.h.
Referenced by ~SVM().
|
protected |
Definition at line 124 of file svm_wrapper.h.