Home | Trees | Indices | Help |
|
---|
|
This class stores an empirical covariance matrix between the signal and time delayed signal that can be updated incrementally.
Note that the internal sum is a standard __add__ operation. We are not using any of the fancy sum algorithms to avoid round off errors when adding many numbers. If you want to contribute a CovarianceMatrix class that uses such algorithms we would be happy to include it in MDP. For a start see the Python recipe by Raymond Hettinger at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/393090 For a review about floating point arithmetic and its pitfalls see http://docs.sun.com/source/806-3568/ncg_goldberg.html
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
|
Inits some internals structures. The reason this is not done in the constructor is that we want to be able to derive the input dimension and the dtype directly from the data this class receives. |
The collected data is adjusted to compute the covariance matrix of the signal x(1)...x(N-dt) and the delayed signal x(dt)...x(N), which is defined as <(x(t)-<x(t)>)*(x(t+dt)-<x(t+dt)>)> . The function returns a tuple containing the covariance matrix, the average <x(t)> over the first N-dt points, the average of the delayed signal <x(t+dt)> and the number of observations. The internal data is then reset to a zero-state. If A is defined, the covariance matrix is transformed by the linear transformation Ax . E.g. to whiten the data, A is the whitening matrix. |
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1-MDP on Mon Apr 27 21:56:25 2020 | http://epydoc.sourceforge.net |