#include <SvmProblemBuilder.h>
Collaboration diagram for Impala::Core::Training::SvmProblemBuilder:
Public Member Functions | |
SvmProblemBuilder (Table::AnnotationTable *annotation, Table::QuidTable *usedQuids) | |
virtual | ~SvmProblemBuilder () |
void | AddFeatureTable (Feature::FeatureTable *table) |
svm_problem * | MakeProblem () |
svm_problem * | MakeProblem (Vector::VectorTem< double > *feature) |
Private Member Functions | |
void | AddFeature (Quid q, Vector::VectorTem< double > *feature) |
void | Clear () |
double | ClassLabel (Quid q) const |
void | AddFeature (Quid q, Vector::VectorTem< double > *feature, double &label, svm_node *nodes) |
Private Attributes | |
Table::AnnotationTable * | mAnnotation |
Table::QuidTable * | mUsedQuids |
int | mModelLength |
std::deque< int > | mModelLabels |
std::deque< svm_node * > | mModelNodes |
Util::SimpleMap< Quid, int > | mQuidsIndices |
ILOG_VAR_DECL |
This class is used by TrainDataSrcFeature to create a svm_problem. An instance has a partial model (stored in the members mModel*) that grows on each call of AddFeatureTable or AddFeature. When a client calls MakeProblem the partial model is moved into a proper svm_model and returned. Please note the client is responsible for destruction of said svm_model (and thus of the allocated memory therein).
Definition at line 26 of file SvmProblemBuilder.h.