Marsyas  0.5.0-beta1
Public Member Functions
DeltaFirstOrderRegression Class Reference

Calculate simple time domain delta in first order regression fashion. More...

#include <DeltaFirstOrderRegression.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () 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.

Detailed Description

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 $x[t]$ (discrete time $t$). For the delta at time $t$, we consider the three samples $x[t-1]$, $x[t]$ and $x[t+1]$ and fit a linear function $y=a t + b$ to these points in the least squares sense. The slope $a$ of this function is used as delta $\Delta[t]$ for time $t$. Mathematically, this regression problem with three points at uniform time point simplifies to a simple calculation

\[\Delta[t] = \frac{x[t+1] - x[t-1]}{2}\]


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.

Constructor & Destructor Documentation

DeltaFirstOrderRegression ( std::string  name)

DeltaFirstOrderRegression constructor.

Add any specific controls needed by this MarSystem.

Definition at line 24 of file DeltaFirstOrderRegression.cpp.

DeltaFirstOrderRegression copy constructor.

Definition at line 31 of file DeltaFirstOrderRegression.cpp.

DeltaFirstOrderRegression destructor.

Definition at line 37 of file DeltaFirstOrderRegression.cpp.

Member Function Documentation

MarSystem * clone ( ) const [virtual]

Implementation of the MarSystem::clone() method.

Implements MarSystem.

Definition at line 42 of file DeltaFirstOrderRegression.cpp.

void myProcess ( realvec in,
realvec out 
) [virtual]

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.

The documentation for this class was generated from the following files: