Samples accumulator abstract class.
More...
#include <SamplesAccumulator.h>
Samples accumulator abstract class.
This class allows for storing samples (e.g. n-dimensinal points in feature space) into the memory
- Author
- Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de
Definition at line 15 of file SamplesAccumulator.h.
◆ CSamplesAccumulator() [1/2]
DirectGraphicalModels::CSamplesAccumulator::CSamplesAccumulator |
( |
byte |
nStates, |
|
|
size_t |
maxSamples |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
nStates | Number of states (classes) |
maxSamples | Maximum number of samples to be used in training.
Default value 0 means using all the samples.
If another value is specified, the class for training will use maxSamples random samples from the whole amount of samples, added via addSample() function
|
Definition at line 25 of file SamplesAccumulator.h.
◆ CSamplesAccumulator() [2/2]
DirectGraphicalModels::CSamplesAccumulator::CSamplesAccumulator |
( |
const CSamplesAccumulator & |
| ) |
|
|
delete |
◆ ~CSamplesAccumulator()
DirectGraphicalModels::CSamplesAccumulator::~CSamplesAccumulator |
( |
void |
| ) |
|
|
inline |
◆ addSample()
void DirectGraphicalModels::CSamplesAccumulator::addSample |
( |
const Mat & |
featureVector, |
|
|
byte |
state |
|
) |
| |
Adds new sample to the accumulator.
- Parameters
-
featureVector | Multi-dimensinal point: Mat(size: nFeatures x 1) |
state | State (class) corresponding to the featureVector |
Definition at line 13 of file SamplesAccumulator.cpp.
◆ getNumInputSamples()
int DirectGraphicalModels::CSamplesAccumulator::getNumInputSamples |
( |
byte |
state | ) |
const |
Returns the number of input samples in container for the state (class) state.
This function retunts the number of samples added with the addSample() function. Please note, that this number may be larger than the number of samples, actually stored in container, that may me true, if the constructor's argument maxSamples was specified. than the output of the getNumSamples()
- Parameters
-
- Returns
- The number of samples
Definition at line 35 of file SamplesAccumulator.cpp.
◆ getNumSamples()
int DirectGraphicalModels::CSamplesAccumulator::getNumSamples |
( |
byte |
state | ) |
const |
Returns the number of stored samples in container for the state (class) state.
- Parameters
-
- Returns
- The number of samples
Definition at line 29 of file SamplesAccumulator.cpp.
◆ getSamplesContainer()
Mat DirectGraphicalModels::CSamplesAccumulator::getSamplesContainer |
( |
byte |
state | ) |
const |
|
inline |
Returns samples container for the state (class) state.
- Parameters
-
- Returns
- The container: Mat(size: nSamples x nFeatures)
Definition at line 50 of file SamplesAccumulator.h.
◆ operator=()
◆ release()
void DirectGraphicalModels::CSamplesAccumulator::release |
( |
byte |
state | ) |
|
Releases memory of container for the state (class) state.
- Parameters
-
Definition at line 41 of file SamplesAccumulator.cpp.
◆ reset()
void DirectGraphicalModels::CSamplesAccumulator::reset |
( |
void |
| ) |
|
◆ m_maxSamples
int DirectGraphicalModels::CSamplesAccumulator::m_maxSamples |
|
private |
◆ m_vNumInputSamples
vec_int_t DirectGraphicalModels::CSamplesAccumulator::m_vNumInputSamples |
|
private |
◆ m_vSamplesAcc
vec_mat_t DirectGraphicalModels::CSamplesAccumulator::m_vSamplesAcc |
|
private |
The documentation for this class was generated from the following files: