Shed Light on Black Box Machine Learning Models
Overview
Shed light on black box machine learning models by the help of model performance, variable importance, global surrogate models, ICE profiles, partial dependence (Friedman J. H. (2001) doi:10.1214/aos/1013203451), accumulated local effects (Apley D. W. (2016) doi:10.48550/arXiv.1612.08468), further effects plots, interaction strength, and variable contribution breakdown (Gosiewska and Biecek (2019) doi:10.48550/arXiv.1903.11420). All tools are implemented to work with case weights and allow for stratified analysis. Furthermore, multiple flashlights can be combined and analyzed together.
New functionality
plot.light_effects()has gained an argumentrecode_labelsto modify the curve labels.
Bug fixes
- More than one "by" variable would raise an error when creating the "flashlight" object, see #62.
- Fix compatibility issue with ggplot v 4.0.
Deprecated functionality
add_shap(): Deprecated in favor of {kernelshap} or {fastshap}.- Consequently,
type = "shap"inlight_profile(),light_importance(),light_scatter(), andlight_profile2d()is deprecated as well. plot_counts()is deprecated.light_recode()is deprecated.- The option
stats = "quartile"oflight_effects()andlight_profile()is deprecated. - Column names of resulting data objects cannot be set via
options()anymore.
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
Exported -> internal
The following functions are now internal:
grouped_center()grouped_counts()grouped_stats()grouped_weighted_mean()all_identical()auto_cut()common_breaks()cut3()
Minor changes
most_important()is not S3 anymore.plot.light_breakdown()andplot.light_importance()do not use flipped coordinates anymore.
Less dependencies
- {cowplot} and {withr} packages have been removed from "imports".
Announcements for upcoming version 1.1.0
- The argument "stats" in
light_effects()andlight_profile()will be removed. It has no effect anymore.
Maintenance
- Update code coverage version.
- Fix NOTES on CRAN results page.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 36
- Examples that run
- 100%24 run in a plain check
- Exported functions with examples
- 85%
- Documented parameters
- 96%
- Return-value docs
- 100%
- Help pages citing references
- 19%
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 5
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/mayer79/flashlight on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2025-10-13 · The repository has a site deploy workflow
Show all practicesHide 1 practice
Dependencies
Installing flashlight adds 31 packages (15 with compiled code, 29 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, isoband 1.5 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.0.0Latest2025-10-13 · current release · diff ↗ ·
removed 7 exports
all_identical, auto_cut, cut3, grouped_center, grouped_counts, grouped_stats, grouped_weighted_mean - RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.9.02023-05-10 · diff ↗
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.8.0
- 0.7.52021-02-13 · diff ↗
- 0.7.42021-01-10 · diff ↗
- 0.7.3
- RR 4.0.0 released · 2020-04-24
- 0.7.22020-04-14 · diff ↗
- 0.7.12020-03-20 · diff ↗
- 0.7.02020-03-12 · diff ↗ ·
added 3 exports
is.light_global_surrogate, is.light_global_surrogate_multi, light_global_surrogate
Show 7 earlier eventsHide 7 earlier events
Package metadata
- First published
- 2019-08-25
- Total releases
- 15 / 7 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.2.0
- Download size
- 436 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("flashlight")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.