24 #include "core/MACoreTypes.hpp" 25 #include "MAClassifier.hpp" 27 #include <boost/scoped_ptr.hpp> 44 typedef boost::shared_ptr<MAModel> ModelSPtr;
61 explicit MAModel(
const std::string& model_str);
79 bool LoadFromOpenCVXmlFormat(
const std::string& model_str);
90 bool LoadFromDlibFormat(
const std::string& model_str);
101 unsigned int GetSerializedStringSize()
const;
110 unsigned int GetFeatureCount()
const;
131 MC::FloatList
Predict(
const MC::FloatTable& input_vectors, MC::FloatList& confidences);
143 float Predict(
const MC::FloatList& input_vector, MC::FloatList& confidence);
152 MC::FloatList GetVariableImportances();
189 boost::scoped_ptr<CvStatModel>
Model;
boost::scoped_ptr< DlibWrapper > DlibFunctions
Wrapper for Dlib classifier/regression functions.
unsigned int SerializedStringSize
Serialized string size.
MA::CRMethodType Classifier
Classifier type.
int FeatureCount
Feature count.
MCBinaryData * Encode() const
Encode the classifier into binary data.
Classifier model based on OpenCV classifiers.
MA::FeaturePreprocessingType PreprocessingMode
Preprocessing mode.
static MAClassifier * Decode(const MCBinaryData &data)
Decode the classifier from binary data.
boost::scoped_ptr< CvStatModel > Model
OpenCV classifier model.
MC::FloatList Predict(const MC::FloatTable &input_vectors, MC::FloatList &confidences)
Predict some samples with labels.
MC::FloatTable PreprocessingCoefficients
Preprocessing coefficients.
MC::FloatList GetModelLabels() const
Get the list of unique labels.
MC::FloatList Labels
List of labels in the model.
Common inferface for multiple classifiers and regression algorithms.
boost::scoped_ptr< CvEmWrapper > EmModel
OpenCV classifier model (Expectation Maximization)