STAVAG.calculate_sps
- STAVAG.calculate_sps(coord_dict_raw, coord_dict_rand, n_dim, keys=None)[source]
Compute STAVAG priority scores (sps) for each axis.
The score is the right tail proportion of random importances that are greater than or equal to the observed importance.
- Parameters:
coord_dict_raw (Dict[str, DataFrame]) – Dict of DataFrames per axis. Each DataFrame must contain columns ‘Feature’ and ‘Importance’.
coord_dict_rand (Dict[str, ndarray]) – Dict of random importance arrays per axis.
n_dim (int) – Number of coordinate dimensions.
keys (Sequence[str] | None) – Optional explicit axis names to use.
- Returns:
The same dict as coord_dict_raw with a new column ‘sps’ added to each axis DataFrame.
- Return type:
Dict[str, DataFrame]