NEWS.md
plot.light_effects()
has gained an argument recode_labels
to modify the curve labels.add_shap()
: Deprecated in favor of {kernelshap} or {fastshap}.type = "shap"
in light_profile()
, light_importance()
, light_scatter()
, and light_profile2d()
is deprecated as well.plot_counts()
is deprecated.light_recode()
is deprecated.stats = "quartile"
of light_effects()
and light_profile()
is deprecated.options()
anymore.The following functions are now internal:
grouped_center()
grouped_counts()
grouped_stats()
grouped_weighted_mean()
all_identical()
auto_cut()
common_breaks()
cut3()
most_important()
is not S3 anymore.plot.light_breakdown()
and plot.light_importance()
do not use flipped coordinates anymore.light_effects()
and light_profile()
will be removed. It has no effect anymore.The following breaking changes are intended for version 1.0.0.
add_shap()
: Deprecated in favor of {kernelshap} or {fastshap}.type = "shap"
in light_profile()
, light_importance()
, light_scatter()
, and light_profile2d()
is deprecated as well.plot_counts()
: Deprecated. Might later be replaced by {ggside}.stats = "quartiles
in light_profile()
and light_effects()
.These functions will become internal in {flashlight} 1.0.0. Most likely you have never used any of them.
grouped_center()
grouped_counts()
grouped_stats()
grouped_weighted_mean()
light_check()
light_combine()
light_recode()
-> similar functionality will be added as option in light_effects()
all_identical()
auto_cut()
cut3()
Currently, predefined column names in data objects returned by light_*()
functions can be changed via options()
. For instance, the model name is stored in column “label”, which can be changed via option flashlight.label_name = "label"
.
In {flashlight} 1.0.0, these options will vanish. To avoid clashs with existing feature names, we will use exotic column names such as “label_” instead. As a consequence, data returned by light_*()
functions will have different column names.
This is a documentation and maintainance release.
light_interaction
now uses a default grid size of 200 instead of 30 to calculate partial dependency profiles. Furthermore, the used sample size to calculate the interaction statistics have been increased from 300 to 1000. The two changes improve considerably the stability of the results at the price of a substantial increase in runtime. For slow prediction functions, choose lower values as suitable.Emergency release. Fixes a problem introduced with ggplot 3.3.0 when plotting light_importance and light_interaction objects.
Added light_scatter
and plot.light_scatter
to create scatter plots of response, predictions, residuals, or SHAP values by some variable.
Static (approximate) SHAP values can be added to a (multi-)flashlight by calling add_shap
.
light_importance
, light_profile
, and light_scatter
are now able to work with SHAP values.
Added Friedman’s H statistic (global and pairwise interaction strength) to light_interaction
with variants.
Added random permutation visit strategy to light_breakdown
, serving as approximate SHAP.
Added more options how to center light_ice
: Mean center each profile to the same value (within “by” groups) and 0-mean center each profile.
Added option rotate_x
to plot_light_breakdown
and plot_light_importance
.
Added function grouped_center
to allow grouped and weighted 0-mean centering of a numeric variable.
Added function grouped_count
to allow grouped and weighted counts.
Added function grouped_weighted_mean
for fast grouped weighted means.
response
, residuals
, and predict
now have a method for multiflashlights.
auto_cut
, the workhorse behind quantile binning a numeric input variable x, is now using ecdf based quantiles in order to ensure all evaluation points are in the domain of x.
Centering at “first”, “middle”, and “last” in light_ice
now anchors the curves at 0 to be in line with other implementations.
Added light_interaction
, a measure of overall interaction strength per covariable based on standard deviation across c-ICE curves.
Added the option m_repetitions = 1
to light_importance
. Set to higher value to get more stable estimates of variable importance as well as standard errors for small data.
Added type = "ale"
to light_profile
to show accumulated local effects plots (ALE plots). They are now also calculated by light_effects
. In the plot
method, set use = "all"
to show all profiles. The default is all without ALE plots.
Added the possibility to center ICE curves at first evaluation point to improve visibility of interactions. Together with partial dependence with quartile aggregation, this is an interesting possibility to detect interactions.
grouped_stats
has received an argument value_name
.