This function calculates the attributions of the model
(Oscillations explanations) for each observation in the raster.
Model predictions are decomposed into parts that are attributed for particular variables,
and then the attributions are assigned to the corresponding cells in the raster.
See the documentation of the DALEX::predict_parts()
function for more details.
Usage
map_oscillations(
explainer,
raster_obs,
maxcell = 1000,
...,
N = 500,
type = "oscillations_uni"
)
Arguments
- explainer
a model to be explained, preprocessed by the
DALEX::explain()
function- raster_obs
a raster object with the observations to be explained (predictors used in the model)
- maxcell
the maximum number of cells in the raster. If the number of cells in the raster is greater than
maxcell
, the function will samplemaxcell
cells from the raster. By default 1000- ...
other parameters that will be passed to
iBreakDown::break_down()
- N
the maximum number of observations used for calculation of attributions. By default 500
- type
the type of variable attributions. Either
oscillations_uni
(default),oscillations_emp
,oscillations
Value
A raster object with the same dimensions as raster_obs
. The number of layers equal to the number of variables in the model.
References
Lundberg, S. (2017). A unified approach to interpreting model predictions. arXiv preprint arXiv:1705.07874.
Staniak, M., & Biecek, P. (2018). Explanations of model predictions with live and breakDown packages. arXiv preprint arXiv:1804.01955.
Biecek, P., & Burzykowski, T. (2021). Explanatory model analysis: explore, explain, and examine predictive models. Chapman and Hall/CRC.