AutoCorrelator Class Reference

List of all members.


Detailed Description

Auto-correlator.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
Calculates the autocorrelation of a Markov process for a particular time step $\Delta t$:

\[ R_s(\Delta t) = \left(\sum_{n = 1}^{s}\mathbf{y}_{n-1}\mathbf{y}_n^T - \hat{\mathbf{\mu}}_s\hat{\mathbf{\mu}}_s^T\right) \hat{\Sigma}_s^{-1} \,, \]

where $s$ is the current step, each $\mathbf{y}_n$ is the state of the system at step $n$ (time $n\Delta t$), and $\hat{\mathbf{\mu}}_s$ and $\hat{\Sigma}_s$ are the sample mean and covariance of $\mathbf{y}_0,\ldots,\mathbf{y}_s$, respectively.

The autocovariance is given by the autocorrelation without the normalisation term.

Usage

Firstly construct a NumericalSolver for simulating a trajectory from the model of interest. Pass this into the constructor of the AutoCorrelator object.

Call step() to advance the system by a number of steps, adding each new point to the autocorrelation calculation. The return value of step() indicates whether the calculation has converged. Note that this convergence check compares the autocorrelations before and after the call to step(), so that multiple calls are necessary for the return value to be meaningful.

Definition at line 47 of file AutoCorrelator.hpp.


Public Member Functions

 AutoCorrelator (NumericalSolver *solver, const double delta)
 Constructor.
virtual ~AutoCorrelator ()
 Destructor.
void setErrorBounds (double maxAbsoluteError=1e-3)
 Set the error bounds for the convergence criterion.
const
indii::ml::aux::matrix
getAutoCorrelation ()
 Get the autocorrelation as calculated up to the current time.
const
indii::ml::aux::matrix
getAutoCovariance ()
 Get the autocovariance as calculated up to the current time.
bool step (const unsigned int steps)
 Step.

Constructor & Destructor Documentation

AutoCorrelator ( NumericalSolver solver,
const double  delta 
)

Constructor.

Parameters:
solver Numerical solver.
delta $\Delta t$; time step.

Definition at line 7 of file AutoCorrelator.cpp.

~AutoCorrelator (  )  [virtual]

Destructor.

Definition at line 30 of file AutoCorrelator.cpp.


Member Function Documentation

void setErrorBounds ( double  maxAbsoluteError = 1e-3  ) 

Set the error bounds for the convergence criterion.

Parameters:
maxAbsoluteError The maximum permitted absolute error.

Definition at line 42 of file AutoCorrelator.cpp.

const aux::matrix & getAutoCorrelation (  ) 

Get the autocorrelation as calculated up to the current time.

Returns:
Autocorrelation as calculated up to the current time.

Definition at line 34 of file AutoCorrelator.cpp.

const aux::matrix & getAutoCovariance (  ) 

Get the autocovariance as calculated up to the current time.

Returns:
Autocovariance as calculated up to the current time.

Definition at line 38 of file AutoCorrelator.cpp.

bool step ( const unsigned int  steps  ) 

Step.

Parameters:
steps $\delta s$; number of steps to take.
Returns:
True if the calculation has converged.
Advances system in time by $\Delta s \Delta t$ and adds the new point to the autocorrelation calculation.

Convergence is checked in the sense:

\[ \|R_s(\Delta t) - R_{s+\Delta s}(\Delta t)\| < \epsilon + \xi\|R_s(\Delta t) - R_{s+\Delta s}(\Delta t)\|\,, \]

where $\epsilon$ is the maximum permitted absolute error, and $\xi$ the maximum permitted relative error.

Definition at line 46 of file AutoCorrelator.cpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3