|
1 | | -#' @title Generates interactive studio to explain predictive model |
| 1 | +#' @title Generate Interactive Studio with Explanations for the Model |
2 | 2 | #' |
3 | 3 | #' @description |
4 | 4 | #' This tool uses your model, data and new observations, to provide local |
|
7 | 7 | #' |
8 | 8 | #' Find more details about plots in \href{https://pbiecek.github.io/PM_VEE/}{Predictive Models: Explore, Explain, and Debug} |
9 | 9 | #' |
10 | | -#' @param object an explainer created with function \code{DALEX::explain()} or a model to be explained. |
11 | | -#' @param new_observation a new observation with columns that correspond to variables used in the model. |
12 | | -#' @param facet_dim dimensions of the grid. Default is \code{c(2,2)}. |
13 | | -#' @param time in ms. Set animation length. Default is \code{500}. |
14 | | -#' @param max_features maximum number of features to be included in Break Down and SHAP Values plots. Default is \code{10}. |
15 | | -#' @param N number of observations used for calculation of partial dependency profiles. Default is \code{500}. |
16 | | -#' @param B number of random paths used for calculation of SHAP values. Default is \code{15}. |
17 | | -#' @param show_info verbose progress bar on console? Default is \code{TRUE}. |
18 | | -#' @param parallel speed up computation using \code{parallelMap::parallelMap()}. |
| 10 | +#' @param object An \code{explainer} created with function \code{DALEX::explain()} or a model to be explained. |
| 11 | +#' @param new_observation A new observation with columns that correspond to variables used in the model. |
| 12 | +#' @param facet_dim Dimensions of the grid. Default is \code{c(2,2)}. |
| 13 | +#' @param time Time in ms. Set animation length. Default is \code{500}. |
| 14 | +#' @param max_features Maximum number of features to be included in Break Down and SHAP Values plots. Default is \code{10}. |
| 15 | +#' @param N Number of observations used for calculation of partial dependency profiles. Default is \code{400}. |
| 16 | +#' @param B Number of random paths used for calculation of SHAP values. Default is \code{15}. |
| 17 | +#' @param show_info Verbose progress bar on the console. Default is \code{TRUE}. |
| 18 | +#' @param parallel Speed up the computation using \code{parallelMap::parallelMap()}. |
19 | 19 | #' See \href{https://modeloriented.github.io/modelStudio/articles/vignette_modelStudio.html#parallel-computation}{\bold{vignette}}. |
20 | 20 | #' @param viewer Default is \code{external} to display in an external RStudio window. |
21 | 21 | #' Use \code{browser} to display in an external browser or |
22 | 22 | #' \code{internal} to use the RStudio internal viewer pane for output. |
23 | | -#' @param options customize \code{modelStudio}. See \code{\link{modelStudioOptions}} and |
| 23 | +#' @param options Customize \code{modelStudio}. See \code{\link{modelStudioOptions}} and |
24 | 24 | #' \href{https://modeloriented.github.io/modelStudio/articles/vignette_modelStudio.html#plot-options}{\bold{vignette}}. |
25 | | -#' @param ... other parameters. |
26 | | -#' @param data validation dataset, will be extracted from \code{object} if it is an explainer. |
| 25 | +#' @param ... Other parameters. |
| 26 | +#' @param data Validation dataset, will be extracted from \code{object} if it is an explainer. |
27 | 27 | #' NOTE: It is best when target variable is not present in the \code{data}. |
28 | | -#' @param y true labels for \code{data}, will be extracted from \code{object} if it is an explainer. |
29 | | -#' @param predict_function predict function, will be extracted from \code{object} if it is an explainer. |
30 | | -#' @param label a name of the model, will be extracted from \code{object} if it is an explainer. |
| 28 | +#' @param y True labels for \code{data}, will be extracted from \code{object} if it is an \code{explainer}. |
| 29 | +#' @param predict_function Predict function, will be extracted from \code{object} if it is an \code{explainer}. |
| 30 | +#' @param label A name of the model, will be extracted from \code{object} if it is an \code{explainer}. |
31 | 31 | #' |
32 | | -#' @return an object of the \code{r2d3} class |
| 32 | +#' @return An object of the \code{r2d3} class. |
33 | 33 | #' |
34 | 34 | #' @importFrom utils head tail setTxtProgressBar txtProgressBar installed.packages |
35 | 35 | #' @importFrom stats aggregate predict |
@@ -100,7 +100,7 @@ modelStudio.explainer <- function(object, |
100 | 100 | facet_dim = c(2,2), |
101 | 101 | time = 500, |
102 | 102 | max_features = 10, |
103 | | - N = 500, |
| 103 | + N = 400, |
104 | 104 | B = 15, |
105 | 105 | show_info = TRUE, |
106 | 106 | parallel = FALSE, |
@@ -139,7 +139,7 @@ modelStudio.default <- function(object, |
139 | 139 | facet_dim = c(2,2), |
140 | 140 | time = 500, |
141 | 141 | max_features = 10, |
142 | | - N = 500, |
| 142 | + N = 400, |
143 | 143 | B = 15, |
144 | 144 | show_info = TRUE, |
145 | 145 | parallel = FALSE, |
|
0 commit comments