Effector: A Python Package for Global and Regional Feature Effects
Organizations: Harokopio University of Athens · ATHENA Research Center · Leibniz Institute for Prevention Research and Epidemiology - BIPS · University of Warsaw ·
Abstract
Effector is a Python package for interpreting machine learning (ML) models that are trained on tabular data through global and regional feature effects. Global effects, like Partial Dependence Plot (PDP) and Accumulated Local Effects (ALE), are widely used for explaining tabular ML models due to their simplicity -- each feature's average influence on the prediction is summarized by a single 1D plot. However, when features are interacting, global effects can be misleading. Regional effects address this by partitioning the input space into disjoint subregions with minimal interactions within each and computing a separate regional effect per subspace. Regional effects are then visualized by a set of 1D plots per feature. Effector provides efficient implementations of state-of-the-art global and regional feature effects methods under a unified API. The package integrates seamlessly with major ML libraries like scikit-learn and PyTorch. It is designed to be modular and extensible, and comes with comprehensive documentation and tutorials. Effector is an open-source project publicly available on Github at https://github.com/givasile/effector.
Figures & tables
| (d-)PDP | (RH)ALE | SHAP-DP | |||||||
| Glob. | Reg. | Glob. | Reg. | Glob. | Reg. | Heter. | Imp. | Fidel. | |
| scikit-learn ( Pedregosa et al., 2011 ) | ✓ | ||||||||
| InterpretML ( Nori et al., 2019 ) | ✓ | ||||||||
| DALEX ( Baniecki et al., 2021 ) | ✓ | a | ✓ | ||||||
| ALIBI ( Klaise et al., 2021 ) | ✓ | ✓ | ✓ | ||||||
| PDPbox ( link ) | ✓ | ||||||||
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Global effect | Heterogeneity |
|---|---|---|
| PDP | ( Friedman and Popescu, 2008 ) | ( Herbinger et al., 2024 ) |
| d-PDP | ( Goldstein et al., 2015 ) | ( Herbinger et al., 2024 ) |
| ALE | ( Apley and Zhu, 2020 ) | ( Herbinger et al., 2024 ) |
| RHALE | ( Gkolemis et al., 2023a ) | ( Gkolemis et al., 2023a ) |
| SHAP-DP | ( Lundberg and Lee, 2017 ) | ( Herbinger et al., 2024 ) |
| Method | Continuous | Ordinal | Nominal |
|---|---|---|---|
| PDP / d-PDP | grid evaluation | ICE at observed levels | ICE at observed levels |
| ALE | binned local differences | adjacent-level differences | level differences, seriated order |
| RHALE | binned local derivatives | grouped level differences | falls back to ALE |
| SHAP-DP | binned SHAP values | per-level SHAP statistics | per-level SHAP statistics |
| Method | Global fit | model passes | Regional search |
|---|---|---|---|
| RHALE | s | ms | |
| ALE | s | ms | |
| d-PDP | s | ms | |
| PDP | s | ms | |
| SHAP-DP | – slower (implementation-dependent) | — | |
Tabular ML
Tabular machine learning develops models and tools for learning from structured data arranged in rows and columns.
See all 125 papers