pycrostates.segmentation.excess_entropy_rate#
- pycrostates.segmentation.excess_entropy_rate(segmentation, history_length, ignore_repetitions=False, log_base=2, n_jobs=1)[source]#
Estimate the entropy rate and the
excess_entropyof the segmentation.The entropy rate and the
excess_entropyare estimated from a linear fit:\[H(X_{n}^{(k)}) = a \cdot k + b\]where
ais the entropy rate andbthe excess entropy as described in Von Wegner[1].- Parameters:
- segmentation
RawSegmentation|EpochsSegmentation Segmentation object containing the microstate symbolic sequence.
- history_length
int Maximum history length in sample to estimate the excess entropy rate.
- 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