Package: ale 0.5.3.20260217

ale: Interpretable Machine Learning and Statistical Inference with Accumulated Local Effects (ALE)

Accumulated Local Effects (ALE) were initially developed as a model-agnostic approach for global explanations of the results of black-box machine learning algorithms. ALE has a key advantage over other approaches like partial dependency plots (PDP) and SHapley Additive exPlanations (SHAP): its values represent a clean functional decomposition of the model. As such, ALE values are not affected by the presence or absence of interactions among variables in a mode. Moreover, its computation is relatively rapid. This package reimplements the algorithms for calculating ALE data and develops highly interpretable visualizations for plotting these ALE values. It also extends the original ALE concept to add bootstrap-based confidence intervals and ALE-based statistics that can be used for statistical inference. For more details, see Okoli, Chitu. 2023. “Statistical Inference Using Machine Learning and Classical Techniques Based on Accumulated Local Effects (ALE).” arXiv. <doi:10.48550/arXiv.2310.09877>.

Authors:Chitu Okoli [aut, cre]

ale_0.5.3.20260217.tar.gz
ale_0.5.3.20260217.zip(r-4.7)ale_0.5.3.20260217.zip(r-4.6)ale_0.5.3.20260217.zip(r-4.5)
ale_0.5.3.20260217.tgz(r-4.6-any)ale_0.5.3.20260217.tgz(r-4.5-any)
ale_0.5.3.20260217.tar.gz(r-4.7-any)ale_0.5.3.20260217.tar.gz(r-4.6-any)
ale_0.5.3.20260217.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ale/json (API)

# Install 'ale' in R:
install.packages('ale', repos = c('https://tripartio.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/tripartio/ale/issues

Pkgdown/docs site:https://tripartio.github.io

Datasets:
  • census - Census Income
  • var_cars - Multi-variable transformation of the mtcars dataset.

On CRAN:

Conda:

quarto

6.35 score 5 stars 37 scripts 568 downloads 8 exports 81 dependencies

Last updated from:c8f1d6d5da. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK398
source / vignettesOK483
linux-release-x86_64OK347
macos-release-arm64OK459
macos-oldrel-arm64OK326
windows-develOK386
windows-releaseOK428
windows-oldrelOK415
wasm-releaseOK142

Exports:ALEALEpDistcustomizegetinvert_probsModelBootresolve_x_colsretrieve_rds

Dependencies:actuarassertthatbackportsbbmlebdsmatrixbroomclicodetoolscpp11cvardigestdplyrexpintextraDistrfarverfastICAfBasicsfGarchfurrrfuturegbutilsgenericsggplot2globalsgluegssgtableGUILDSinsightintervalsisobandlabelinglatticelifecyclelistenvlogitnormmagrittrMASSMatrixmvtnormnakagaminloptrnumDerivparallellypatchworkpillarpkgconfigpoilogpoweRlawpracmaprogressrpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppParallelRdpackRfastrlangS7sadsscalesspatialstablediststaccuracystringistringrtibbletidyrtidyselecttimeDatetimeSeriesunivariateMLutf8vctrsVGAMviridisLitewithrzigg

Analyzing a Small Rice Yield Dataset with ALE-Based Inference
Introduction | Set up R environment | Data preparation and description | Model evaluation | Metrics for numeric prediction | Descriptive versus predictive metrics | OLS regression | Model training | ALE analysis | Random forest | GAM | Single ALE on entire dataset | ALE on bootstrapped models | Discussion | Comparison with Gomez and Gomez (1984) | Explicit Points of Agreement | Direct Points of Disagreement | Additional Nuances Beyond Gomez and Gomez | Conclusion | References

Last update: 2026-02-17
Started: 2026-02-17

Analyzing a Large Corn Yield Dataset with ALE-Based Inference
Introduction | Setup R environment | Dataset: ACDC corn yields | Corn data preparation | Data description | Removal of county identifier | Model evaluation | Cross-validation function | OLS regression | Random forest | ALE analysis | Full ALE results: all main effects and interactions | Statistical reliability vs practical importance | Data-only bootstrapped ALE results on focal variables | ALE plots | Conclusion | Methodological comments | Key findings | A note on unsurprising results | References

Last update: 2026-02-17
Started: 2026-02-17

ale package handling of various input datatypes
var_cars: modified mtcars dataset (Motor Trend Car Road Tests) | Modelling with ALE and GAM

Last update: 2026-02-17
Started: 2023-09-30

ALE-based statistics for statistical inference and effect sizes
Example dataset | Full model bootstrap | Create p-value distribution objects | Bootstrap the model with p-values | ALE effect size measures | ALE plots with p-values | ALE plots without p-values | ALE effect size measures on the scale of the y outcome variable | ALE range (ALER) | ALE deviation (ALED) | Normalized ALE effect size measures | Normalized ALER (NALER) | Normalized ALED (NALED) | The ALER band and random variables | Interpretation of normalized ALE effect sizes | Statistical inference with ALE | ALE data structures for categorical and numeric variables | Bootstrap-based inference with ALE

Last update: 2026-02-17
Started: 2023-09-30

Analyzing small datasets (fewer than 2000 rows) with ALE
What is a "small" dataset? | attitude dataset | Format | Source | ALE for ordinary least squares regression (multiple linear regression) | Full model bootstrapping | ALE for generalized additive models (GAM) | model_call_string argument for models not automatically detected

Last update: 2026-02-17
Started: 2023-09-30

Introduction to the ale package
diamonds dataset | Modelling with generalized additive models (GAM) | ALE object for ALE data | Bootstrapped ALE | ALE interactions

Last update: 2026-02-17
Started: 2023-09-30