ms_merge_observations: Merge the observations of modelStudio objects

View source: R/ms_merge_observations.R

ms_merge_observationsR Documentation

Merge the observations of modelStudio objects

Description

This function merges local explanations from multiple modelStudio objects into one.

Usage

ms_merge_observations(...)

Arguments

...

modelStudio objects created with modelStudio().

Value

An object of the r2d3, htmlwidget, modelStudio class.

References

  • The input object is implemented in DALEX

  • Feature Importance, Ceteris Paribus, Partial Dependence and Accumulated Dependence explanations are implemented in ingredients

  • Break Down and Shapley Values explanations are implemented in iBreakDown

See Also

Vignettes: modelStudio - R & Python examples and modelStudio - perks and features

Examples


library("DALEX")
library("modelStudio")

# fit a model
model_happiness <- glm(score ~., data = happiness_train)

# create an explainer for the model
explainer_happiness <- explain(model_happiness,
                               data = happiness_test,
                               y = happiness_test$score)

# make studios for the model
ms1 <- modelStudio(explainer_happiness,
                   N = 200,  B = 5)

ms2 <- modelStudio(explainer_happiness,
                   new_observation = head(happiness_test, 3),
                   N = 200,  B = 5)

# merge 
ms <- ms_merge_observations(ms1, ms2)
ms



modelStudio documentation built on March 7, 2023, 6:56 p.m.