nigsp.operations.metrics.gsdi¶
- nigsp.operations.metrics.gsdi(ts_split, mean=False, keys=None)[source]¶
Compute the generalised SDI.
- 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:
dictofnumpy.ndarrayReturns a dictionary of computed gSDI.
- Raises:
ValueErrorIf keys are provided but not contained in the dictionary.