pyemma.coordinates.estimation.covariance.LaggedCovariance

class pyemma.coordinates.estimation.covariance.LaggedCovariance(c00=True, c0t=False, ctt=False, remove_constant_mean=None, remove_data_mean=False, reversible=False, bessel=True, sparse_mode='auto', modify_data=False, lag=0, weights=None, stride=1, skip=0, chunksize=None, ncov_max=inf)

Compute lagged covariances between time series.

Parameters:
  • 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
  • sparse_mode (str, optional, default='auto') –
    one of:
    • ‘dense’ : always use dense mode
    • ‘auto’ : automatic
    • ‘sparse’ : always use sparse mode if possible
  • modify_data (bool, optional, default=False) – If remove_data_mean=True, the mean will be removed in the input data, without creating an independent copy. This option is faster but should only be selected if the input data is not used elsewhere.
  • lag (int, optional, default=0) – lag time. Does not work with c0t=True or ctt=True.
  • weights (trajectory weights.) –
    one of:
    • None : all frames have weight one.
    • float : all frames have the same specified weight.
    • object: an object that possesses a .weight(X) function in order to assign weights to every
      time step in a trajectory X.
  • 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.
__init__(c00=True, c0t=False, ctt=False, remove_constant_mean=None, remove_data_mean=False, reversible=False, bessel=True, sparse_mode='auto', modify_data=False, lag=0, weights=None, stride=1, skip=0, chunksize=None, ncov_max=inf)

Methods

__init__([c00, c0t, ctt, ...])
estimate(X, **kwargs)
fit(X) Estimates parameters - for compatibility with sklearn.
get_params([deep]) Get parameters for this estimator.
partial_fit(X) incrementally update the estimates
register_progress_callback(call_back[, stage]) Registers the progress reporter.
set_params(**params) Set the parameters of this estimator.

Attributes

chunksize chunksize defines how much data is being processed at once.
cov
cov_tau
logger The logger for this class instance
mean
mean_tau
model The model estimated by this Estimator
name The name of this instance
nsave
show_progress whether to show the progress of heavy calculations on this object.
chunksize

chunksize defines how much data is being processed at once.

fit(X)

Estimates parameters - for compatibility with sklearn.

Parameters:X (object) – A reference to the data from which the model will be estimated
Returns:estimator – The estimator (self) with estimated model.
Return type:object
get_params(deep=True)

Get parameters for this estimator.

Parameters:deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
Returns:params – Parameter names mapped to their values.
Return type:mapping of string to any
logger

The logger for this class instance

model

The model estimated by this Estimator

name

The name of this instance

partial_fit(X)

incrementally update the estimates

Parameters:X (array, list of arrays, PyEMMA reader) – input data.
register_progress_callback(call_back, stage=0)

Registers the progress reporter.

Parameters:
  • call_back (function) –

    This function will be called with the following arguments:

    1. stage (int)
    2. instance of pyemma.utils.progressbar.ProgressBar
    3. optional *args and named keywords (**kw), for future changes
  • stage (int, optional, default=0) – The stage you want the given call back function to be fired.
set_params(**params)

Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as pipelines). The former have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. :returns: :rtype: self

show_progress

whether to show the progress of heavy calculations on this object.