Marsyas
0.6.0-alpha
|
Calculate simple time domain delta in first order regression fashion. More...
#include <DeltaFirstOrderRegression.h>
Inherits MarSystem.
Public Member Functions | |
MarSystem * | clone () const |
Implementation of the MarSystem::clone() method. | |
DeltaFirstOrderRegression (std::string name) | |
DeltaFirstOrderRegression constructor. | |
DeltaFirstOrderRegression (const DeltaFirstOrderRegression &a) | |
DeltaFirstOrderRegression copy constructor. | |
void | myProcess (realvec &in, realvec &out) |
Implementation of the MarSystem::myProcess method. | |
~DeltaFirstOrderRegression () | |
DeltaFirstOrderRegression destructor. |
Calculate simple time domain delta in first order regression fashion.
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.
DeltaFirstOrderRegression | ( | const DeltaFirstOrderRegression & | a | ) |
DeltaFirstOrderRegression copy constructor.
Definition at line 31 of file DeltaFirstOrderRegression.cpp.
DeltaFirstOrderRegression destructor.
Definition at line 37 of file DeltaFirstOrderRegression.cpp.
Implementation of the MarSystem::clone() method.
Implements MarSystem.
Definition at line 42 of file DeltaFirstOrderRegression.cpp.
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.