nigsp.operations.metrics.sdi¶
- nigsp.operations.metrics.sdi(ts_split, mean=False, keys=None)[source]¶
Compute the Structural Decoupling Index (SDI).
i.e. the ratio between the norms of the “high” and the norm of the “low” “graph-filtered” timeseries.
If the given dictionary does not contain the keywords “high” and “low”, the SDI is computed as the ratio between the norm of the second and the norm of the first dictionary entry. “keys” can be used to indicate the order of the two keys, or to select two elements of a bigger dictionary.
- Parameters:
- ts_split
dictornumpy.ndarray A dictionary containing two entries. If the two entries are “low” and “high”, then SDI will be computed as the norm of the high vs the norm of the low, otherwise as the ratio between the second (second key in sorted keys) and the first.
- mean
bool, optional If True, compute mean over the last axis (e.g. between subjects)
- keys
Noneorlistofstr, optional Can be used to select two entries from a bigger dictionary and/or to specify the order in which the keys should be read (e.g. forcing a different order from the sorted keys).
- ts_split
- Returns:
numpy.ndarrayReturns the structural decoupling index
- Raises:
ValueErrorIf keys are provided but not contained in the dictionary If keys are not provided and the dictionary has more than 2 entries