Module ateams.statistics.autocorrelation
Functions
def integrated(X, isNormalized=False)-
Computes (an estimate of) the integrated autocorrelation time \tau_X of the observable X by \tau_X = \frac 12 \sum_{t=-M}^M \overline \rho_X(t) = \frac 12 + \sum_{t=1}^M \overline \rho_X(t), where \overline \rho_X(t) is the normalized autocorrelation for X. Computes \tau_X for all 1 \leq M \leq N-1 for N = |X| the number of observations.
Args
X:np.array- A NumPy array of numerical values.
isNormalized:boolean=False- Are the data passed to
Xalready normalized autocorrelation times? If not, we first compute \overline \rho_X.
Returns
(Estimates of) the integrated autocorrelation times.
def normalized(X)-
Computes the vector \overline \rho_X of normalized autocorrelations \overline \rho_X(t) = \rho_X(t)/\rho_X(0) for the observable X.
Args
X:np.array- A NumPy array of numerical values.
Returns
A NumPy array of normalized autocorrelation values.
def unnormalized(X)-
Computes the vector \rho_X of unnormalized autocorrelations \rho_X(t) for the set of (numerical) observations X by \rho_X(t) = \frac{1}{N-|t|} \sum_{i=1}^{N-|t|}(X_i - \overline X)(X_{i+t} - \overline X), where \overline X is the sample mean and N = |X| is the number of samples in the observed data.
Args
X:np.array- A NumPy array of numerical values.
Returns
A NumPy array of unnormalized autocorrelation values.