pyemma.coordinates.covariance_lagged¶
-
pyemma.coordinates.
covariance_lagged
(data=None, c00=True, c0t=True, ctt=False, remove_constant_mean=None, remove_data_mean=False, reversible=False, bessel=True, lag=0, weights='empirical', stride=1, skip=0, chunksize=None)¶ Compute lagged covariances between time series. If data is available as an array of size (TxN), where T is the number of time steps and N the number of dimensions, this function can compute lagged covariances like
\[C_00 &= X^T X \ C_{0t} &= X^T Y \ C_{tt} &= Y^T Y,\]where X comprises the first T-lag time steps and Y the last T-lag time steps. It is also possible to use more than one time series, the number of time steps in each time series can also vary.
Parameters: - data (ndarray (T, d) or list of ndarray (T_i, d) or a reader created by) – source function array with the data, if available. When given, the covariances are immediately computed.
- c00 (bool, optional, default=True) – compute instantaneous correlations over the first part of the data. If lag==0, use all of the data.
- c0t (bool, optional, default=False) – compute lagged correlations. Does not work with lag==0.
- ctt (bool, optional, default=False) – compute instantaneous correlations over the second part of the data. Does not work with lag==0.
- remove_constant_mean (ndarray(N,), optional, default=None) – substract a constant vector of mean values from time series.
- remove_data_mean (bool, optional, default=False) – substract the sample mean from the time series (mean-free correlations).
- reversible (bool, optional, default=False) – symmetrize correlations.
- bessel (bool, optional, default=True) – use Bessel’s correction for correlations in order to use an unbiased estimator
- lag (int, optional, default=0) – lag time. Does not work with xy=True or yy=True.
- weights (optional, default="empirical") –
- Re-weighting strategy to be used in order to compute equilibrium covariances from non-equilibrium data.
- “empirical”: no re-weighting
- “koopman”: use re-weighting procedure from [1]_
- weights: An object that allows to compute re-weighting factors. It must possess a method
- weights(X) that accepts a trajectory X (np.ndarray(T, n)) and returns a vector of re-weighting factors (np.ndarray(T,)).
- stride (int, optional, default = 1) – Use only every stride-th time step. By default, every time step is used.
- skip (int, optional, default=0) – skip the first initial n frames per trajectory.
- chunksize (int, optional, default=None) – The chunk size at which the input files are being processed.
Returns: - lc (a
LaggedCovariance
object.) - .. [1] Wu, H., Nueske, F., Paul, F., Klus, S., Koltai, P., and Noe, F. 2016. Bias reduced variational
- approximation of molecular kinetics from short off-equilibrium simulations. J. Chem. Phys. (submitted)