|
Point Cloud Library (PCL)
1.11.1-dev
|
SVM (Support Vector Machines) training class for the SVM machine learning. More...
#include <pcl/ml/svm_wrapper.h>
Inheritance diagram for pcl::SVMTrain:Public Member Functions | |
| SVMTrain () | |
| Constructor. More... | |
| ~SVMTrain () | |
| Destructor. More... | |
| void | setParameters (SVMParam param) |
| Change default training parameters (pcl::SVMParam). More... | |
| SVMParam | getParameters () |
| Return the current training parameters. More... | |
| SVMModel | getClassifierModel () |
| Return the result of the training. More... | |
| void | setInputTrainingSet (std::vector< SVMData > training_set) |
| It adds/store the training set with labelled data. More... | |
| std::vector< SVMData > | getInputTrainingSet () |
| Return the current training set. More... | |
| void | resetTrainingSet () |
| Reset the training set. More... | |
| bool | trainClassifier () |
| Start the training of the SVM classifier. More... | |
| bool | loadProblem (const char *filename) |
| Read in a problem (in svmlight format). More... | |
| void | setDebugMode (bool in) |
| Set to 1 for debugging info. More... | |
| bool | saveTrainingSet (const char *filename) |
| Save the raw training set in a file (in svmlight format). More... | |
| bool | saveNormTrainingSet (const char *filename) |
| Save the normalized training set in a file (in svmlight format). More... | |
Public Member Functions inherited from pcl::SVM | |
| 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 | |
| void | doCrossValidation () |
| To cross validate the classifier. More... | |
| void | scaleFactors (std::vector< SVMData > training_set, svm_scaling &scaling) |
| It extracts scaling factors from the input training_set. More... | |
Protected Member Functions inherited from pcl::SVM | |
| 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... | |
Protected Attributes | |
| bool | debug_ |
| Set to 1 to see the training output. More... | |
| int | cross_validation_ |
| Set too 1 for cross validating the classifier. More... | |
| int | nr_fold_ |
| Number of folds to be used during cross validation. More... | |
| std::string | class_name_ |
| bool | labelled_training_set_ |
| char * | line_ |
| int | max_line_len_ |
| SVMModel | model_ |
| SVMParam | param_ |
| svm_problem | prob_ |
| svm_scaling | scaling_ |
| std::vector< SVMData > | training_set_ |
Protected Attributes inherited from pcl::SVM | |
| std::vector< SVMData > | training_set_ |
| svm_problem | prob_ |
| SVMModel | model_ |
| svm_scaling | scaling_ |
| SVMParam | param_ |
| std::string | class_name_ |
| char * | line_ |
| int | max_line_len_ |
| bool | labelled_training_set_ |
Additional Inherited Members | |
Static Protected Member Functions inherited from pcl::SVM | |
| static void | printNull (const char *) |
| Set for output printings during classification. More... | |
SVM (Support Vector Machines) training class for the SVM machine learning.
It creates a model for the classifier from a labelled input dataset.
OPTIONAL: pcl::SVMParam has to be given as input to vary the default training method and parameters.
Definition at line 233 of file svm_wrapper.h.
|
inline |
Constructor.
Definition at line 266 of file svm_wrapper.h.
References pcl::SVM::class_name_, and pcl::SVM::printNull().
|
inline |
Destructor.
Definition at line 274 of file svm_wrapper.h.
References svm_model::l, and pcl::SVM::model_.
|
protected |
To cross validate the classifier.
It is automatic for probability estimate.
|
inline |
Return the result of the training.
Definition at line 296 of file svm_wrapper.h.
References pcl::SVM::model_.
|
inline |
Return the current training set.
Definition at line 310 of file svm_wrapper.h.
References pcl::SVM::training_set_.
|
inline |
Return the current training parameters.
Definition at line 289 of file svm_wrapper.h.
References pcl::SVM::param_.
|
inline |
Read in a problem (in svmlight format).
Definition at line 334 of file svm_wrapper.h.
References pcl::SVM::loadProblem(), and pcl::SVM::prob_.
|
inline |
Reset the training set.
Definition at line 317 of file svm_wrapper.h.
References pcl::SVM::training_set_.
|
inline |
Save the normalized training set in a file (in svmlight format).
Definition at line 366 of file svm_wrapper.h.
References pcl::SVM::prob_, and pcl::SVM::saveProblemNorm().
|
inline |
Save the raw training set in a file (in svmlight format).
Definition at line 356 of file svm_wrapper.h.
References pcl::SVM::saveProblem().
|
protected |
It extracts scaling factors from the input training_set.
The scaling of the training_set is a mandatory for a good training of the classifier.
|
inline |
Set to 1 for debugging info.
Definition at line 341 of file svm_wrapper.h.
References debug_, and pcl::SVM::printNull().
|
inline |
It adds/store the training set with labelled data.
Definition at line 303 of file svm_wrapper.h.
References pcl::SVM::training_set_.
|
inline |
Change default training parameters (pcl::SVMParam).
Definition at line 282 of file svm_wrapper.h.
References pcl::SVM::param_.
| bool pcl::SVMTrain::trainClassifier | ( | ) |
Start the training of the SVM classifier.
|
protected |
Definition at line 129 of file svm_wrapper.h.
|
protected |
Set too 1 for cross validating the classifier.
Definition at line 248 of file svm_wrapper.h.
|
protected |
Set to 1 to see the training output.
Definition at line 246 of file svm_wrapper.h.
Referenced by setDebugMode().
|
protected |
Definition at line 133 of file svm_wrapper.h.
|
protected |
Definition at line 131 of file svm_wrapper.h.
|
protected |
Definition at line 132 of file svm_wrapper.h.
|
protected |
Definition at line 125 of file svm_wrapper.h.
|
protected |
Number of folds to be used during cross validation.
It indicates in how many parts is split the input training set.
Definition at line 251 of file svm_wrapper.h.
|
protected |
Definition at line 128 of file svm_wrapper.h.
|
protected |
Definition at line 124 of file svm_wrapper.h.
|
protected |
Definition at line 126 of file svm_wrapper.h.
|
protected |
Definition at line 123 of file svm_wrapper.h.