Package: midr 0.6.2.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.2.900.tar.gz
midr_0.6.2.900.zip(r-4.7-x86_64)midr_0.6.2.900.zip(r-4.7-arm64)midr_0.6.2.900.zip(r-4.6-x86_64)midr_0.6.2.900.zip(r-4.6-arm64)midr_0.6.2.900.zip(r-4.5-x86_64)
midr_0.6.2.900.tgz(r-4.6-x86_64)midr_0.6.2.900.tgz(r-4.6-arm64)midr_0.6.2.900.tgz(r-4.5-x86_64)midr_0.6.2.900.tgz(r-4.5-arm64)
midr_0.6.2.900.tar.gz(r-4.7-arm64)midr_0.6.2.900.tar.gz(r-4.7-x86_64)midr_0.6.2.900.tar.gz(r-4.6-arm64)midr_0.6.2.900.tar.gz(r-4.6-x86_64)
midr_0.6.2.900.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
midr/json (API)

# 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.60 score 7 stars 1 packages 18 scripts 584 downloads 30 exports 3 dependencies

Last updated from:898758e1e6. Checks:13 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE140
linux-devel-x86_64NOTE151
source / vignettesOK176
linux-release-arm64NOTE124
linux-release-x86_64NOTE188
macos-release-arm64NOTE193
macos-release-x86_64NOTE716
macos-oldrel-arm64NOTE215
macos-oldrel-x86_64NOTE323
windows-devel-arm64NOTE372
windows-devel-x86_64NOTE175
windows-release-arm64NOTE391
windows-release-x86_64NOTE128
windows-oldrel-x86_64NOTE122
wasm-releaseOK91

Exports:as.midlistcolor.themecolor.theme.registercolor.themesfactor.encoderfactor.frameget.linkget.yhatggmidinterpretis.color.themelabels<-mid.breakdownmid.conditionalmid.importancemidlistmidr.optionsmidr.parnumeric.encodernumeric.framescale_color_themescale_colour_themescale_fill_themeset.color.themeterm.effectterm.fterm.labelstheme_midrto.colorsweighted.loss

Dependencies:RcppRcppEigenrlang

Readme and manuals

Help Manual

Help pageTopics
Color Themes for Graphicscolor.theme is.color.theme
Register Color Themescolor.theme.register set.color.theme
Retrieve Color Theme Informationcolor.themes
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
Calculate MID Importancemid.importance
Combine MID Objectsas.midlist midlist
Set or Get Global Options for the midr Packagemidr.options midr.par
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
Calculate MID-Derived Shapley Valuesshapviz.mid
Summarize MID Modelssummary.mid summary.mids
Evaluate Single Component Functions of Additive Modelsterm.effect term.effect.default term.effect.mid term.effect.mids term.f
Extract and Filter Term Labelsterm.labels term.labels.default term.labels.midlist
Default Plotting Themestheme_midr
Map Values to Colors using Color Themesto.colors
Weighted Loss Functionweighted.loss