Effector: A Python Package for Global and Regional Feature Effects
Authors: Vasilis Gkolemis, Christos Diou, Dimitris Kyriakopoulos, Konstantinos Tsopelas, Julia Herbinger, Hubert Baniecki, Dimitrios Rontogiannis, Loukas Kavouras, Maximilian Muschalik, Theodore Dalamagas, Eirini Ntoutsi, Bernd Bischl, Giuseppe Casalicchio
Organizations: Harokopio University of Athens · ATHENA Research Center · Leibniz Institute for Prevention Research and Epidemiology - BIPS · University of Warsaw · LMU Munich and Munich Center for Machine Learning (MCML) · University of the Bundeswehr Munich
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
Figure 1: The complete explanation produced by effector.explain on Bike Sharing, read top-down. (a) The explained-variance bar: one global curve per feature (a GAM surrogate) reproduces 70.3% of the model’s variance, and the accepted regional splits raise it to 90.2%; the rest is unexplained. (b) The triage plane places every feature by importance ( x ) and heterogeneity ( y ), both in target units (rental counts); hr sits top-right (important and heterogeneous), and the arrows show how its subregions reduce heterogeneity. (c) The top two features at the granularity each needs: hr , heterogeneous, shown regionally (global, working days, non-working days), and yr , the second most important, shown as a single global curve because its split is redundant.
(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 )
✓
×
×
×
×
×
×
×
×
Table 1: Comparison between current feature effect libraries and Effector (verified July 2026). Heter.: scalar heterogeneity score; Imp.: feature importance derived from the effects; Fidel.: explained-variance measure of the explanation. a manual user-defined cohorts only; b automatic tree-based cohorts, but only for importance bars, not effect curves; c research code, not on PyPI, no heterogeneity objective scores exposed.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 2: Global PDP with ICE for all features of the Bike Sharing dataset.
Figure 3: The partition tree of hr . Top: global effect. Middle: split on workingday . Bottom: non-working days refined by temp ; working days refined by yr .
Figure 4: Excerpts from the self-contained HTML page written by report.to_html . Left, top: the header, run configuration, and explained-variance overview. Left, bottom: the decision sequence, listing each accepted and rejected split with its reason. Right: the triage plane and the ranked feature table; the table reports the scores of the selected snapshot, i.e., after the accepted splits. The full page also embeds the global and regional effect plots of the top features.
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 )
Appendix
Table 2: References for the implemented methods: the global effect formula and the heterogeneity index optimized during the regional search.
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
Appendix
Table 3: How each method handles each feature type.
Method
Global fit
≈ model passes
Regional search
RHALE
0.10 s
1T
+1 ms
ALE
0.20 s
2T
+2 ms
d-PDP
0.26 s
2.6T
+1 ms
PDP
0.27 s
2.7T
+1 ms
SHAP-DP
10 – 100× slower (implementation-dependent)
—
Appendix
Table 4: Runtime at N=10,000 and D=5 . The global fit is given in seconds and as a multiple of T , the cost of one full-dataset model pass ( T≈0.1 s here); the regional search ( find_regions followed by select_regions ) re-uses the cached local effects and needs no model calls.
Global feature effects such as partial dependence (PD) and accumulated local effects (ALE) plots are widely used to interpret black-box models. However, they are only estimates of true underlying effects, and their reliability depends on multiple sources of error. Despite the popularity of global feature effects, these error sources are largely unexplored. In particular, the practically relevant question of whether to use training or holdout data to estimate feature effects remains unanswered. We address this gap by providing a systematic, estimator-level analysis that disentangles sources of bias and variance for PD and ALE. To this end, we derive a mean-squared-error decomposition that separates model bias, estimation bias, model variance, and estimation variance, and analyze their dependence on model characteristics, data selection, and sample size. We validate our theoretical findings through an extensive simulation study across multiple data-generating processes, learners, estimation strategies (training data, validation data, and cross-validation), and sample sizes. Our results reveal that, while using holdout data is theoretically the cleanest, potential biases arising from the training data are empirically negligible and dominated by the impact of the usually higher sample size. The estimation variance depends on both the presence of interactions and the sample size, with ALE being particularly sensitive to the latter. Cross-validation-based estimation is a promising approach that reduces the model variance component, particularly for overfitting models. Our analysis provides a principled explanation of the sources of error in feature effect estimates and offers concrete guidance on choosing estimation strategies when interpreting machine learning models.
Timo Heiß, Coco Bögel, Bernd Bischl +1
LMU Munich, Munich, Germany · Munich Center for Machine Learning (MCML)
We introduce xplainfi, an R package built on top of the mlr3 ecosystem for global, loss-based feature importance methods for machine learning models. Various feature importance methods exist in R, but significant gaps remain, particularly regarding conditional importance methods and associated statistical inference procedures. The package implements permutation feature importance, conditional feature importance, relative feature importance, leave-one-covariate-out, and generalizations thereof, and both marginal and conditional Shapley additive global importance methods. It provides a modular conditional sampling architecture based on Gaussian distributions, adversarial random forests, conditional inference trees, and knockoff-based samplers, which enable conditional importance analysis for continuous and mixed data. Statistical inference is available through multiple approaches, including variance-corrected confidence intervals and the conditional predictive impact framework. We demonstrate that xplainfi produces importance scores consistent with existing implementations across multiple simulation settings and learner types, while offering competitive runtime performance. The package is available on CRAN and provides researchers and practitioners with a comprehensive toolkit for feature importance analysis and model interpretation in R.
Lukas Burk, Fiona Katharina Ewald, Giuseppe Casalicchio +2
Partial Dependence Plots (PDPs) visualize how changes in a single feature affect the average model prediction. They are widely used in practice to interpret decision tree ensembles and other machine learning models. Joint-PDPs extend this idea to pairs of features, revealing their combined effect. Partial Dependence Interaction Values (PDIVs) measure feature interactions. The Any-Order-PDIVs task computes these interactions for every feature subset across all rows of the dataset. We introduce Woodelf++, a unified and efficient approach for computing all these useful explainability tools on decision tree ensembles, building on Woodelf, an algorithm for efficient SHAP computation. By deriving suitable metrics over pseudo-Boolean functions, Woodelf++ can compute PDPs (exact and approximate), Joint-PDPs, and Any-Order-PDIVs in a unified framework. Our method delivers substantial complexity improvements over the state of the art, including an exponential gain for Any-Order-PDIVs. Additionally, we introduce and efficiently compute Full PDPs, which leverage the model's split thresholds to faithfully capture its behavior across all possible feature values. Woodelf++ is implemented in pure Python and supports GPU acceleration. On a dataset with 400,000 rows, Woodelf++ computes PDP and Joint-PDP up to 6x faster than the state of the art and up to five orders of magnitude faster than scikit-learn. For Any-Order-PDIVs, the gap is even larger: Woodelf++ computes all interaction values in 5 minutes, while the state of the art is estimated to require over 1,000,000 years.
Ron Wettenstein, Alexander Nadel, Udi Boker
Reichman University, Herzliya, Israel · Faculty of Data and Decision Sciences, Technion, Haifa, Israel