Adaptive Piecewise Local Model-Agnostic Explanations

Implements Adaptive Piecewise Local Interpretable Model-Agnostic Explanations (AP-LIME) and its second-order interaction extension (AP2-LIME) for interpreting predictions from machine learning models. The methods replace the conventional locally weighted linear surrogate in LIME with Multivariate Adaptive Regression Splines (MARS). AP-LIME uses additive piecewise-linear hinge functions, whereas AP2-LIME allows pairwise interactions between hinge functions. The package generates proximity-weighted local explanations, estimates feature contributions, evaluates local surrogate fit, and assesses explanation stability across repeated runs. Stability is measured using the Variables Stability Index (VSI) and Coefficients Stability Index (CSI), including normal-theory and percentile bootstrap confidence intervals. MARS terms with the same predictors, hinge directions, and interaction structure are matched independently of knot locations. Coefficients within matched groups are summarized by their arithmetic mean, while the original knot thresholds remain available for inspection. The MARS-based local explanation approach is discussed by Somuncuoglu and Purutcuoglu (2027, ISBN:978-1-041-34431-5), "Explainable AI Approaches in Biomedical Signals: A Case Study with Pima Indians Diabetes Dataset", in "Biomedical Data Science: A Focus on Signaling", CRC Press.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("aplime")

0.1.0 by Vilda Purutçuoğlu, 6 hours ago


Browse source code at https://github.com/cran/aplime


Authors: Abdullah Nuri Somuncuoğlu [aut] (affiliation: Department of Biomedical Engineering , Middle East Technical University) , Vilda Purutçuoğlu [aut, cre] (affiliation: Department of Statistics , Middle East Technical University)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports earth, stats, utils

Suggests testthat, xgboost


See at CRAN