pycrostates.segmentation.partial_auto_information_function#
- pycrostates.segmentation.partial_auto_information_function(segmentation, lags, ignore_repetitions=False, log_base=2, n_jobs=1)[source]#
Compute the Partial auto-information function.
Compute the Partial auto-information function as described in Von Wegner[1].
\[I(X_{n+k} ; X_{n} | X_{n+k-1}^{(k-1)}) = H(X_{n+k} | X_{n+k-1}^{(k-1)}) - H(X_{n+k} | X_{n+k-1}^{(k-1)}, X_{n}) = H(X_{n+k},X_{n+k-1}^{(k-1)}) - H(X_{n+k-1}^{(k-1)}) - H(X_{n+k},X_{n+k-1}^{(k)}) + H(X_{n+k-1}^{(k)}) = H(X_{n+k}^{(k)}) - H(X_{n+k-1}^{(k-1)}) - H(X_{n+k}^{(k+1)}) + H(X_{n+k-1}^{(k)})\]- Parameters:
- segmentation
RawSegmentation|EpochsSegmentation Segmentation object containing the microstate symbolic sequence.
- lags
int|list,tuple,arrayof shape(n_lags,) The 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