Package: midr 0.6.1.900

Ryoichi Asashiba

midr: Learning from Black-Box Models by Maximum Interpretation Decomposition

The goal of 'midr' is to provide a model-agnostic method for interpreting and explaining black-box predictive models by creating a globally interpretable surrogate model. The package implements 'Maximum Interpretation Decomposition' (MID), a functional decomposition technique that finds an optimal additive approximation of the original model. This approximation is achieved by minimizing the squared error between the predictions of the black-box model and the surrogate model. The theoretical foundations of MID are described in Iwasawa & Matsumori (2025) [Forthcoming], and the package itself is detailed in Asashiba et al. (2025) <doi:10.48550/arXiv.2506.08338>.

Authors:Ryoichi Asashiba [aut, cre], Hirokazu Iwasawa [aut], Reiji Kozuma [ctb]

midr_0.6.1.900.tar.gz
midr_0.6.1.900.zip(r-4.7)midr_0.6.1.900.zip(r-4.6)midr_0.6.1.900.zip(r-4.5)
midr_0.6.1.900.tgz(r-4.6-x86_64)midr_0.6.1.900.tgz(r-4.6-arm64)midr_0.6.1.900.tgz(r-4.5-x86_64)midr_0.6.1.900.tgz(r-4.5-arm64)
midr_0.6.1.900.tar.gz(r-4.7-arm64)midr_0.6.1.900.tar.gz(r-4.7-x86_64)midr_0.6.1.900.tar.gz(r-4.6-arm64)midr_0.6.1.900.tar.gz(r-4.6-x86_64)
midr_0.6.1.900.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
midr/json (API)
NEWS

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

Bug tracker:https://github.com/ryo-asashi/midr/issues

Pkgdown/docs site:https://ryo-asashi.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

actuarialimlinterpretable-machine-learningxaicpp

5.64 score 6 stars 1 packages 18 scripts 519 downloads 28 exports 3 dependencies

Last updated from:510310eef8. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK143
linux-devel-x86_64OK137
source / vignettesOK171
linux-release-arm64OK141
linux-release-x86_64OK159
macos-release-arm64OK204
macos-release-x86_64OK261
macos-oldrel-arm64OK175
macos-oldrel-x86_64OK321
windows-develOK135
windows-releaseOK152
windows-oldrelOK170
wasm-releaseOK110

Exports:as.midlistcolor.themecolor.theme.envcolor.theme.infofactor.encoderfactor.frameget.linkget.yhatggmidinterpretlabels<-mid.breakdownmid.conditionalmid.effectmid.fmid.importancemid.plotsmid.termsmidlistnumeric.encodernumeric.framepar.midrscale_color_themescale_colour_themescale_fill_themeset.color.themetheme_midrweighted.loss

Dependencies:RcppRcppEigenrlang

Readme and manuals

Help Manual

Help pageTopics
Color Themes for Graphicscolor.theme
Retrieve Color Theme Informationcolor.theme.env color.theme.info
Subset MID Objectsextract.midlist [.midlist [.midrib [[.midrib
Encoder for Qualitative Variablesfactor.encoder factor.frame
Extended Parametric Link Functionsget.link
Wrapper Prediction Functionget.yhat get.yhat.AccurateGLM get.yhat.coxph get.yhat.default get.yhat.fitlist get.yhat.flexsurvreg get.yhat.gam get.yhat.glm get.yhat.glmnet get.yhat.ksvm get.yhat.lm get.yhat.mboost get.yhat.mid get.yhat.mids get.yhat.model_fit get.yhat.ObliqueForest get.yhat.randomForest get.yhat.ranger get.yhat.rfsrc get.yhat.rpart get.yhat.rpf get.yhat.svm get.yhat.workflow
Plot MID Component Function with ggplot2autoplot.mid ggmid ggmid.mid
Plot MID Breakdown with ggplot2autoplot.midbrk ggmid.midbrk
Compare MID Breakdowns with ggplot2autoplot.midbrks ggmid.midbrks
Plot MID Conditional Expectation with ggplot2autoplot.midcon ggmid.midcon
Compare MID Conditional Expectations with ggplot2autoplot.midcons ggmid.midcons
Plot MID Importance with ggplot2autoplot.midimp ggmid.midimp
Compare MID Importances with ggplot2autoplot.midimps ggmid.midimps
Compare MID Component Functions with ggplot2autoplot.mids ggmid.mids
Fit MID Modelsinterpret interpret.default interpret.formula
Label MID Objectslabels.midlist labels.midrib labels<- labels<-.midlist labels<-.midrib
Calculate MID Breakdownmid.breakdown
Calculate MID Conditional Expectationmid.conditional
Evaluate Single MID Component Functionsmid.effect mid.f
Calculate MID Importancemid.importance
Plot Multiple MID Component Functionsmid.plots
Extract Terms from MID Modelsmid.terms
Combine MID Objectsas.midlist midlist
Encoder for Quantitative Variablesnumeric.encoder numeric.frame
Plot MID Component Functionplot.mid
Plot MID Breakdownplot.midbrk
Compare MID Breakdownsplot.midbrks
Plot MID Conditional Expectationplot.midcon
Compare MID Conditional Expectationsplot.midcons
Plot MID Importanceplot.midimp
Compare MID Importancesplot.midimps
Compare MID Component Functionsplot.mids
Predict Method for fitted MID Modelspredict.mid predict.mids
Print MID Modelsprint.mid print.mids
Color Theme Scales for ggplot2 Graphicsscale_color_theme scale_colour_theme scale_fill_theme
Register Color Themesset.color.theme
Calculate MID-Derived Shapley Valuesshapviz.mid
Summarize MID Modelssummary.mid summary.mids
Default Plotting Themespar.midr theme_midr
Weighted Loss Functionweighted.loss