Package: ale 0.3.0.20241118

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.20241118.tar.gz
ale_0.3.0.20241118.zip(r-4.5)ale_0.3.0.20241118.zip(r-4.4)ale_0.3.0.20241118.zip(r-4.3)
ale_0.3.0.20241118.tgz(r-4.4-any)ale_0.3.0.20241118.tgz(r-4.3-any)
ale_0.3.0.20241118.tar.gz(r-4.5-noble)ale_0.3.0.20241118.tar.gz(r-4.4-noble)
ale_0.3.0.20241118.tgz(r-4.4-emscripten)ale_0.3.0.20241118.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'))

Peer review:

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

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

On CRAN:

6.89 score 3 stars 1 packages 27 scripts 284 downloads 3 exports 69 dependencies

Last updated 4 days agofrom:93f541feb7. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 19 2024
R-4.5-winOKNov 19 2024
R-4.5-linuxOKNov 19 2024
R-4.4-winOKNov 19 2024
R-4.4-macOKNov 19 2024
R-4.3-winOKNov 19 2024
R-4.3-macOKNov 19 2024

Exports:alecreate_p_distmodel_bootstrap

Dependencies:actuarassertthatbackportsbroomclicodetoolscolorspacecpp11cvardigestdplyrexpintextraDistrfansifarverfastICAfBasicsfGarchfurrrfuturegbutilsgenericsggplot2globalsgluegssgtableinsightisobandlabelinglatticelifecyclelistenvlogitnormmagrittrMASSMatrixmgcvmunsellnakagaminlmeparallellypatchworkpillarpkgconfigprogressrpurrrR6rbibutilsRColorBrewerRcppRdpackrlangscalesspatialstablediststaccuracystringistringrtibbletidyrtidyselecttimeDatetimeSeriesunivariateMLutf8vctrsviridisLitewithr

ale function handling of various datatypes for x

Rendered fromale-x-datatypes.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-11-14
Started: 2023-09-30

ALE-based statistics for statistical inference and effect sizes

Rendered fromale-statistics.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-11-11
Started: 2023-09-30

Analyzing small datasets (fewer than 2000 rows) with ALE

Rendered fromale-small-datasets.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-11-14
Started: 2023-09-30

Introduction to the ale package

Rendered fromale-intro.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-11-09
Started: 2023-09-30

Readme and manuals

Help Manual

Help pageTopics
Add two arrays or matrices, ignoring NA values by defaultadd_array_na.rm
Create and return ALE data, statistics, and plotsale
Calculate statistics from ALE y values.ale_stats
Calculate statistics from 2D ALE y values.ale_stats_2D
Calculate ALE datacalc_ale
Cast (convert) the class of an objectcast
Census Incomecensus
Sum up a matrix across columnscol_sums
Create an object of the ALE statistics of a random variable that can be used to generate p-valuescreate_p_dist
Extract all NWSE diagonals from a matrixextract_2D_diags
Extract all FNWBSE diagonals from a 3D arrayextract_3D_diags
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
Execute full model bootstrapping with ALE calculation on each bootstrap runmodel_bootstrap
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 'ale_boot' objectsplot.ale_boot
Plot method for ale_plots objectplot.ale_plots
Compute preparatory data for ALE calculationprep_var_for_ale
Print Method for ale objectprint.ale
Print method for ale_plots objectprint.ale_plots
Multi-variable transformation of the mtcars dataset.var_cars
Determine the datatype of a vectorvar_type