Main Page · Modules · All Classes · Class Hierarchy |
Collected data with portable storage functions. More...
#include <MAClassifierSamples.hpp>
Public Member Functions | |
MAClassifierSamples () | |
Class constructor. | |
const MC::FloatTable & | GetFeatureVectors () const |
Get all feature vectors. More... | |
const MC::FloatList & | GetLabels () const |
Get all labels. More... | |
void | AddSample (const MC::FloatList &feature_vector, float label) |
Add a sample. More... | |
void | AddSamples (const MC::FloatTable &feature_vectors, const MC::FloatList &labels) |
Add more samples. More... | |
void | RemoveSample (unsigned int index) |
Remove a sample. More... | |
MCBinaryData * | Encode () const |
Encode into binary data. More... | |
bool | SaveToFile (const std::string &file_name) const |
Save data to a file. More... | |
Static Public Member Functions | |
static MAClassifierSamples * | Decode (const MCBinaryData &data) |
Decode from binary data. More... | |
static MAClassifierSamples * | LoadFromFile (const std::string &file_name) |
Load data from a file. More... | |
Protected Attributes | |
MC::FloatTable | FeatureVectors |
Feature vectors. | |
MC::FloatList | Labels |
Labels. | |
Collected data with portable storage functions.
Definition at line 47 of file MAClassifierSamples.hpp.
void MAClassifierSamples::AddSample | ( | const MC::FloatList & | feature_vector, |
float | label | ||
) |
Add a sample.
feature_vector | Feature vector |
label | Label |
Definition at line 46 of file MAClassifierSamples.cpp.
void MAClassifierSamples::AddSamples | ( | const MC::FloatTable & | feature_vectors, |
const MC::FloatList & | labels | ||
) |
Add more samples.
feature_vectors | Feature vectors |
labels | Labels |
Definition at line 64 of file MAClassifierSamples.cpp.
|
static |
Decode from binary data.
data | Data |
Definition at line 120 of file MAClassifierSamples.cpp.
MCBinaryData * MAClassifierSamples::Encode | ( | ) | const |
Encode into binary data.
Definition at line 99 of file MAClassifierSamples.cpp.
const MC::FloatTable & MAClassifierSamples::GetFeatureVectors | ( | ) | const |
Get all feature vectors.
Definition at line 34 of file MAClassifierSamples.cpp.
const MC::FloatList & MAClassifierSamples::GetLabels | ( | ) | const |
Get all labels.
Definition at line 40 of file MAClassifierSamples.cpp.
|
static |
Load data from a file.
file_name | File name |
Definition at line 147 of file MAClassifierSamples.cpp.
void MAClassifierSamples::RemoveSample | ( | unsigned int | index | ) |
Remove a sample.
index | Sample index |
Definition at line 87 of file MAClassifierSamples.cpp.
bool MAClassifierSamples::SaveToFile | ( | const std::string & | file_name | ) | const |
Save data to a file.
file_name | File name |
Definition at line 159 of file MAClassifierSamples.cpp.