What's new in each e2tree release. Condensed from the package NEWS.md on GitHub.
Install with remotes::install_github("agostinognasso/e2tree").
explain(): a single per-instance entry point composing routing, additive attribution, ensemble neighbours, region fidelity, outcome dispersion — and, on request, counterfactuals and stability — into one coherent narrative object.localLoI(): disaggregates the global nLoI into per-node and per-observation fidelity, so you can see where the reconstruction is reliable. mean(obs$loi) reproduces nLoI exactly.eContribution(): exactly additive per-instance Saabas-style attribution of the reconstructed value, per class for classification.eNeighbors(): case-based explanation returning the nearest training cases by the ensemble's own leaf co-occurrence proximity, plus leaf prototypes.eHeterogeneity(): descriptive per-region outcome dispersion — entropy and prediction set for classification, central band and sd for regression.nodeStats() and plotNodeComparison(): full profile of any node (decision rule, per-predictor node-vs-rest statistics via Cohen's d and Cramér's V, response distribution), and side-by-side comparison of two nodes.eCounterfactual(): proximity-native contrastive explanation. Reports the smallest feature change that would move an instance into a different region, and verifies it against the ensemble's own grouping geometry — validated is TRUE only when the forest actually regroups the counterfactual. This is what distinguishes it from surrogate-only counterfactuals, which can flip the approximating tree without convincing the ensemble.eStability(): confidence and stability of a local explanation via bootstrap over the ensemble's trees, yielding a per-instance confidence, a neighbour-stability score, and an interval on the reconstructed outcome. Fills the usual XAI gap of point estimates with no uncertainty.panel_e2tree(): explains an ensemble fitted to panel (unit × time) data by decomposing the feature representation à la Mundlak (1978) into a between (unit-mean) and a within (unit-demeaned) component, growing a separate e2tree surrogate for each. On panels with high intraclass correlation a single pooled e2tree conflates the two sources and the within signal is crowded out.target = "pooled" explains a given pooled ensemble; within = "twoway" adds two-way demeaning with common period effects; na.action = "unit.available" reduces bias in unbalanced panels.panel_health dataset: a simulated country × year panel (30 countries, 2004–2019) of life-expectancy determinants with known between and within drivers and high ICC (≈ 0.96).oob = TRUE. A length check catches silent misalignment.max_thresholds (default 256) contribute at most that many quantile-based candidate splits, bounding the split matrix at O(n · max_thresholds) per feature instead of O(n²) on continuous data.predict.e2tree() (regression) attaches node-level sd via the terminal-node id, fixing wrong values when two leaves share the same prediction.Wtest() now respects its p.value argument, which was hard-coded to 0.05.[A-Za-z0-9_] in feature names, so models whose predictors contained spaces or special characters broke leaf extraction. The adapter now resolves the model's feature names against data (exact match first, sanitised match as fallback) and errors clearly on ambiguity.xgboost (including 3.x), gbm, lightgbm, and catboost — alongside the original randomForest and ranger backends.createDisMatrix() now validates adapter output via validate_terminal_nodes(), rejecting malformed terminal-node matrices with an informative error.ensemble_backend tag; e2tree() and as.rpart() warn when a stale D is reused with a different model.catboost.CatBoost and catboost.Model classes.e2tree objects: predict(), fitted(), residuals() — predict.e2tree() replaces ePredTree() as the standard prediction interface.nodes(), e2splits(), measures(), proximity().as.rpart() and as.party() (partykit constparty, with proper bar plots in terminal nodes).eValidation() gains a test argument: "mantel", "measures", or "both".vimp() auto-detects classification vs regression; importance bars sorted; consistent column naming.moda() accepts non-factor responses (integer 0/1 targets typical of gbm Bernoulli models).goi(), goi_perm(), goi_analysis(): the Goodness of Interpretability index — how well the e2tree-estimated proximity matrix reconstructs the ensemble's — with permutation-based significance testing. Since superseded by loi() / loi_perm(), the normalized Loss of Interpretability.plot_e2tree_vis() (draggable visNetwork trees), plot_e2tree_click() (click-to-inspect nodes), save_e2tree_html() (standalone HTML export).createDisMatrix() co-occurrence computation moved to C++ with OpenMP thread-level parallelism.eval(parse()) calls; vectorized splitting and impurity computation.ranger compatibility.dplyr namespace conflict and missing NAMESPACE imports.ranger models.randomForest ensembles.