#include <DeltaFirstOrderRegression.h>
Inherits Marsyas::MarSystem.
Public Member Functions | |
| MarSystem * | clone () const |
| Implementation of the MarSystem::clone() method. | |
| DeltaFirstOrderRegression (const DeltaFirstOrderRegression &a) | |
| DeltaFirstOrderRegression copy constructor. | |
| DeltaFirstOrderRegression (std::string name) | |
| DeltaFirstOrderRegression constructor. | |
| void | myProcess (realvec &in, realvec &out) |
| Implementation of the MarSystem::myProcess method. | |
| ~DeltaFirstOrderRegression () | |
| DeltaFirstOrderRegression destructor. | |
Private Member Functions | |
| void | addControls () |
| Add specific controls needed by this MarSystem. | |
| void | myUpdate (MarControlPtr sender) |
| Reads changed controls and sets up variables if necessary. | |
Private Attributes | |
| realvec | memory_ |
| Buffers of previous samples. | |
This Delta calculation is typically used for Delta-MFCC features.
The calculation of the first order regression delta is as follows. Given a signal
(discrete time
). For the delta at time
, we consider the three samples
,
and
and fit a linear function
to these points in the least squares sense. The slope
of this function is used as delta
for time
. Mathematically, this regression problem with three points at uniform time point simplifies to a simple calculation
.
This MarSystem uses the calculation above, but adds a time lag of one sample to make the calculation causal (otherwise we need a sample from the future).
Works with multiple observation channels and works across slices (the MarSystem keeps an internal buffer of two samples from previous slice).
This MarSystem has no additional controls.
Definition at line 51 of file DeltaFirstOrderRegression.h.
| DeltaFirstOrderRegression | ( | std::string | name | ) |
DeltaFirstOrderRegression constructor.
Add any specific controls needed by this MarSystem.
Definition at line 24 of file DeltaFirstOrderRegression.cpp.
References DeltaFirstOrderRegression::addControls().
Referenced by DeltaFirstOrderRegression::clone().
Implementation of the MarSystem::myProcess method.
Iterate over the observations and samples and do the processing.
Implements MarSystem.
Definition at line 65 of file DeltaFirstOrderRegression.cpp.
References DeltaFirstOrderRegression::memory_.
| void myUpdate | ( | MarControlPtr | sender | ) | [private, virtual] |
Reads changed controls and sets up variables if necessary.
Use the default MarSystem setup with equal input/output stream format.
Reimplemented from MarSystem.
Definition at line 51 of file DeltaFirstOrderRegression.cpp.
References DeltaFirstOrderRegression::memory_, Marsyas::obsNamesAddPrefix(), realvec::setval(), and realvec::stretch().
1.5.6