Package: ale 0.3.0.20250217

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. <arxiv:2310.09877>. <doi:10.48550/arXiv.2310.09877>.

Authors:Chitu Okoli [aut, cre]

ale_0.3.0.20250217.tar.gz
ale_0.3.0.20250217.zip(r-4.5)ale_0.3.0.20250217.zip(r-4.4)ale_0.3.0.20250217.zip(r-4.3)
ale_0.3.0.20250217.tgz(r-4.5-any)ale_0.3.0.20250217.tgz(r-4.4-any)ale_0.3.0.20250217.tgz(r-4.3-any)
ale_0.3.0.20250217.tar.gz(r-4.5-noble)ale_0.3.0.20250217.tar.gz(r-4.4-noble)
ale_0.3.0.20250217.tgz(r-4.4-emscripten)ale_0.3.0.20250217.tgz(r-4.3-emscripten)
ale.pdf |ale.html
ale/json (API)
NEWS

# 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 site:https://tripartio.github.io

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

On CRAN:

6.45 score 4 stars 27 scripts 331 downloads 5 exports 70 dependencies

Last updated 1 days agofrom:25bf6613ca. Checks:8 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 17 2025
R-4.5-winOKFeb 17 2025
R-4.5-macOKFeb 17 2025
R-4.5-linuxOKFeb 17 2025
R-4.4-winOKFeb 17 2025
R-4.4-macOKFeb 17 2025
R-4.3-winOKFeb 17 2025
R-4.3-macOKFeb 17 2025

Exports:ALEALEpDistgetModelBootresolve_x_cols

Dependencies:actuarassertthatbackportsbroomclicodetoolscolorspacecpp11cvardigestdplyrexpintextraDistrfansifarverfastICAfBasicsfGarchfurrrfuturegbutilsgenericsggplot2globalsgluegssgtableinsightisobandlabelinglatticelifecyclelistenvlogitnormmagrittrMASSMatrixmgcvmunsellnakagaminlmeparallellypatchworkpillarpkgconfigprogressrpurrrR6rbibutilsRColorBrewerRcppRdpackrlangS7scalesspatialstablediststaccuracystringistringrtibbletidyrtidyselecttimeDatetimeSeriesunivariateMLutf8vctrsviridisLitewithr

ale function handling of various datatypes for x

Rendered fromale-x-datatypes.Rmdusingknitr::rmarkdownon Feb 17 2025.

Last update: 2025-02-14
Started: 2023-09-30

ALE-based statistics for statistical inference and effect sizes

Rendered fromale-statistics.Rmdusingknitr::rmarkdownon Feb 17 2025.

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

Analyzing small datasets (fewer than 2000 rows) with ALE

Rendered fromale-small-datasets.Rmdusingknitr::rmarkdownon Feb 17 2025.

Last update: 2025-02-14
Started: 2023-09-30

Introduction to the ale package

Rendered fromale-intro.Rmdusingknitr::rmarkdownon Feb 17 2025.

Last update: 2025-02-14
Started: 2023-09-30

Readme and manuals

Help Manual

Help pageTopics
Add two arrays or matrices, ignoring NA values by defaultadd_array_na.rm
ALE data and statistics that describe a trained modelALE
Calculate statistics from ALE y values.ale_stats
Calculate statistics from 2D ALE y values.ale_stats_2D
Object with the ALE statistics of a random variable for generating p-valuesALEpDist
ALE plots with print and plot methodsALEPlots
Calculate ALE datacalc_ale
Cast (convert) the class of an objectcast
Census Incomecensus
Sum up a matrix across columnscol_sums
Extract all NWSE diagonals from a matrixextract_2D_diags
Extract all FNWBSE diagonals from a 3D arrayextract_3D_diags
S7 generic get method for objects in the ale packageget
get method for ALE objectsget.ALE
get method for ALEPlots objectsget.ALEPlots
get method for ModelBoot objectsget.ModelBoot
Sorted categorical indices based on Kolmogorov-Smirnov distances for empirically ordering categorical categories.idxs_kolmogorov_smirnov
Intrapolate missing values of vectorintrapolate_1D
Intrapolate missing values of matrixintrapolate_2D
Intrapolate missing values of a 3D arrayintrapolate_3D
Statistics and ALE data for a bootstrapped modelModelBoot
Improvements: • Validation: ensure that the object is atomic (not just a vector) • For factors, get all classes and check if any class_x is a factor or ordered • Add arguments to return a unique mode with options to sort: occurrence order, lexicographical Reduce a dataframe to a sample (retains the structure of its columns)params_data
plot method for 'ALE' objectsplot.ALE
Plot method for ALEPlots objectplot.ALEPlots
plot method for 'ModelBoot' objectsplot.ModelBoot
Compute preparatory data for ALE calculationprep_var_for_ale
print Method for ALE objectprint.ALE
Print method for ALEPlots objectprint.ALEPlots
print method for ModelBoot objectprint.ModelBoot
Resolve x_cols and exclude_cols to their standardized formatresolve_x_cols
summary method for ALEPlots objectsummary.ALEPlots
Multi-variable transformation of the mtcars dataset.var_cars
Determine the datatype of a vectorvar_type