ModelOriented / DALEX
Showing 4 of 8 files from the diff.
Newly tracked file
R/predict_diagnostics.R changed.
Newly tracked file
R/explain.R changed.
Newly tracked file
R/model_info.R changed.
Other files ignored by Codecov

@@ -21,6 +21,7 @@
Loading
21 21
#' @importFrom stats ks.test
22 22
#' @importFrom graphics plot
23 23
#' @examples
24 +
#' \donttest{
24 25
#' library("ranger")
25 26
#' titanic_glm_model <- ranger(survived ~ gender + age + class + fare + sibsp + parch,
26 27
#'                      data = titanic_imputed)
@@ -29,7 +30,6 @@
Loading
29 30
#'                          y = titanic_imputed$survived)
30 31
#' johny_d <- titanic_imputed[24, c("gender", "age", "class", "fare", "sibsp", "parch")]
31 32
#'
32 -
#' \donttest{
33 33
#' id_johny <- predict_diagnostics(explainer_glm, johny_d, variables = NULL)
34 34
#' id_johny
35 35
#' plot(id_johny)

@@ -6,6 +6,7 @@
Loading
6 6
#' @return an \code{ggplot2} object of the class \code{gg}.
7 7
#'
8 8
#' @examples
9 +
#' \donttest{
9 10
#' library("ranger")
10 11
#' titanic_glm_model <- ranger(survived ~ gender + age + class + fare + sibsp + parch,
11 12
#'                      data = titanic_imputed)
@@ -14,7 +15,6 @@
Loading
14 15
#'                          y = titanic_imputed$survived)
15 16
#' johny_d <- titanic_imputed[24, c("gender", "age", "class", "fare", "sibsp", "parch")]
16 17
#'
17 -
#' \donttest{
18 18
#' pl <- predict_diagnostics(explainer_glm, johny_d, variables = NULL)
19 19
#' plot(pl)
20 20
#'

@@ -64,6 +64,7 @@
Loading
64 64
#' aps_lm <- explain(aps_lm_model4, data = apartments, label = "model_4v", y = apartments$m2.price,
65 65
#'                                    predict_function = predict)
66 66
#'
67 +
#' \donttest{
67 68
#' # user provided predict_function
68 69
#' aps_ranger <- ranger::ranger(m2.price~., data = apartments, num.trees = 50)
69 70
#' custom_predict <- function(X.model, newdata) {
@@ -100,7 +101,6 @@
Loading
100 101
#' aps_lm_explainer4 <- explain(aps_lm_model4, data = apartments, label = "model_4v",
101 102
#'                              model_info = model_info)
102 103
#'
103 -
#' \donttest{
104 104
#' # simple function
105 105
#' aps_fun <- function(x) 58*x$surface
106 106
#' aps_fun_explainer <- explain(aps_fun, data = apartments, y = apartments$m2.price, label="sfun")

@@ -32,9 +32,11 @@
Loading
32 32
#' aps_lm_model4 <- lm(m2.price ~., data = apartments)
33 33
#' model_info(aps_lm_model4)
34 34
#'
35 +
#' \donttest{
35 36
#' library("ranger")
36 37
#' model_regr_rf <- ranger::ranger(status~., data = HR, num.trees = 50, probability = TRUE)
37 38
#' model_info(model_regr_rf, is_multiclass = TRUE)
39 +
#' }
38 40
#'
39 41
model_info <- function(model, is_multiclass = FALSE, ...)
40 42
  UseMethod("model_info")
Files Coverage
R 86.81%
Project Totals (31 files) 86.81%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading