modelDown: Create page with summary for your models

Description Usage Arguments Details Author(s) Examples

View source: R/modelDown.R

Description

Create page with summary for your models

Usage

1
2
modelDown(..., modules = c("model_performance", "variable_importance",
  "variable_response", "prediction_breakdown"), output_folder = "output")

Arguments

...

explainers

modules

selected modules to generate

output_folder

folder where generated page will be stored

Details

Additional argument that could by passed by name:

Author(s)

Magda Tatarynowicz, Kamil Romaszko, Mateusz Urabński

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
require(ranger)
require(breakDown)
require(DALEX)

# ranger
HR_ranger_model <- ranger(as.factor(left) ~ .,
                      data = HR_data, num.trees = 500, classification = TRUE, probability = TRUE)
explainer_ranger <- explain(HR_ranger_model,
                      data = HR_data, y = HR_data$left, function(model, data) {
 return(predict(model, data)$prediction[,2])
}, na.rm=TRUE)

# glm
HR_glm_model <- glm(left~., HR_data, family = "binomial")
explainer_glm <- explain(HR_glm_model, data=HR_data, y = HR_data$left)

modelDown::modelDown(explainer_ranger, explainer_glm) #all defaults

modelDown::modelDown(explainer_glm,
  modules = c("model_performance", "variable_importance",
              "variable_response", "prediction_breakdown"),
  output_folder = "modelDown_output",
  vr.vars= c("average_montly_hours", "time_spend_company"),
  pb.observations = c(1,2,3),
  vr.type = "ale",
  plot_width=700,
  pb.plot_width=810,
  mp.plot_width=820,
  vi.plot_width=830,
  vr.plot_width=840)

## End(Not run)

kromash/modelDown documentation built on July 7, 2018, 3:34 a.m.