incerto.shift.plot_ks_statistics

incerto.shift.plot_ks_statistics#

incerto.shift.plot_ks_statistics(ks_stats, feature_names=None, top_k=10, show=True)[source]#

Bar chart of per-feature KS statistics showing which features shifted most.

Parameters:
  • ks_stats (Union[Tensor, Iterable[float]]) – KS statistic for each feature, shape (d,)

  • feature_names (Optional[Iterable[str]]) – Optional names for features (default: “Feature 0”, etc.)

  • top_k (int | None) – Show only top K features by KS statistic (default: 10, None for all)

  • show (bool) – Whether to call plt.show() (default: True)

Return type:

Figure

Returns:

The matplotlib Figure object for further customization