pycrostates.segmentation.auto_information_function#
- pycrostates.segmentation.auto_information_function(segmentation, lags, ignore_repetitions=False, log_base=2, n_jobs=1)[source]#
Compute the Auto-information function (aif).
Compute the Auto-information function (aif) as described in Von Wegner[1]:
\[I(X_{n+k} ; X_{n}) = H(X_{n+k}) - H(X_{n+k} | X_{n}) = H(X_{n+k}) - H(X_{n+k},X_{n}) + H(X_{n}) = H(X_{n+k}) + H(X_{n}) - H(X_{n+k},X_{n})\]- Parameters:
- segmentation
RawSegmentation|EpochsSegmentation Segmentation object containing the microstate symbolic sequence.
- lags
int|list|tuple|arrayof shape(n_lags,) Lags at which to compute the auto-information function. If int, will use
lags = np.arange(lags).- ignore_repetitions
bool If
True, ignores state repetitions. For example, the input sequenceAAABBCCDwill be transformed intoABCDbefore any calculation. This is equivalent to setting the duration of all states to 1 sample.- log_base
float|str The log base to use. If string: *
bits: log_base =2*natural: log_base =np.e*dits: log_base =10Default tobits.- n_jobs
int|None The number of jobs to run in parallel. If
-1, it is set to the number of CPU cores. Requires thejoblibpackage.None(default) is a marker for ‘unset’ that will be interpreted asn_jobs=1(sequential execution) unless the call is performed under ajoblib.parallel_configcontext manager that sets another value forn_jobs.
- segmentation
- Returns:
References