Skip to content

Commit 4f554d7

Browse files
committed
documentation
1 parent 2f8c456 commit 4f554d7

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* `margin_left = NULL` by default and it is adjusted based on the length of variable names
77
* the first plot opened in the dashboard is now `FI` instead of `BD` by default
88
* added the `verbose` parameter to `modelStudio()` as an alias to `show_info` [(#101)](https://github.com/ModelOriented/modelStudio/issues/101)
9-
* add new `ms_merge_observations()` function that merges local explanation of observations from multiple `modelStudio` objects [(#102)](https://github.com/ModelOriented/modelStudio/issues/102)
9+
* added new `ms_merge_observations()` function that merges local explanation of observations from multiple `modelStudio` objects [(#102)](https://github.com/ModelOriented/modelStudio/issues/102)
1010

1111
# modelStudio 2.1.2
1212
* fixed an error in `modelStudio()` when data had only one variable [(#99)](https://github.com/ModelOriented/modelStudio/issues/99)

R/ms_merge_observations.R

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@
2525
#' library("DALEX")
2626
#' library("modelStudio")
2727
#'
28+
#' # fit a model
29+
#' model_happiness <- glm(score ~., data = happiness_train)
30+
#'
31+
#' # create an explainer for the model
32+
#' explainer_happiness <- explain(model_happiness,
33+
#' data = happiness_test,
34+
#' y = happiness_test$score)
35+
#'
36+
#' # make studios for the model
37+
#' ms1 <- modelStudio(explainer_happiness,
38+
#' N = 200, B = 5) # faster example
39+
#'
40+
#' ms2 <- modelStudio(explainer_happiness,
41+
#' new_observation = head(happiness_test, 3),
42+
#' N = 200, B = 5)
43+
#'
44+
#' # merge
45+
#' ms <- ms_merge_observations(ms1, ms2)
46+
#' ms
47+
#'
2848
#'
2949
#' @export
3050
#' @rdname ms_merge_observations

man/ms_merge_observations.Rd

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)