nigsp.operations.metrics.gsdi¶
- nigsp.operations.metrics.gsdi(ts_split, mean=False, keys=None)[source]¶
Compute the generalised SDI.
- Parameters:
- ts_split
dict
ornumpy.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
None
orlist
ofstr
, 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:
dict
ofnumpy.ndarray
Returns a dictionary of computed gSDI.
- Raises:
ValueError
If keys are provided but not contained in the dictionary.