Skip to content

Commit 7d401f0

Browse files
authored
Merge pull request #30 from ModelOriented/before_cran
v0.1.9
2 parents bbb4def + b7356a9 commit 7d401f0

33 files changed

+161
-146
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ modelStudio_my_test.R
1515
^CRAN-RELEASE$
1616
^cran-comments\.md$
1717
^pkgdown.*$
18-
CONTRIBUTING.md
18+
^LICENSE$
19+
^CONTRIBUTING.md

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: R
22
sudo: false
33
cache: packages
44

5+
env:
6+
global:
7+
- R_CHECK_ARGS="--timings --run-donttest"
8+
59
r:
610
- release
711
- devel

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Contribute to modelStudio
1+
# Contribute to modelStudio
22

33
#### **Did you find a bug?**
44

DESCRIPTION

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: modelStudio
22
Title: Interactive Studio with Explanations for ML Predictive Models
3-
Version: 0.1.8
3+
Version: 0.1.9
44
Authors@R:
55
c(person("Hubert", "Baniecki", role = c("aut", "cre"),
66
email = "[email protected]",
@@ -10,22 +10,22 @@ Authors@R:
1010
Description: Automate explanation of machine learning predictive models.
1111
This package generates advanced interactive and animated model explanations in the form
1212
of a serverless HTML site. It combines 'R' with 'D3.js' to produce plots and descriptions
13-
for local and global explanations. The whole is greater than the sum of its parts,
14-
so it also supports EDA (Exploratory Data Analysis) on top of that. 'modelStudio' is
15-
a fast and condensed way to get all the answers without much effort.
13+
for various local and global explanations. Tools for model exploration unite with
14+
tools for EDA (Exploratory Data Analysis) to give a broad overview of the model behaviour.
15+
'modelStudio' is a fast and condensed way to get all the answers without much effort.
1616
Break down your model and look into its ingredients with only a few lines of code.
1717
Depends: R (>= 3.5.0)
18-
License: file LICENSE
18+
License: GPL-2
1919
Encoding: UTF-8
2020
LazyData: true
2121
RoxygenNote: 6.1.1
2222
Imports:
2323
iBreakDown (>= 0.9.9),
24-
ingredients (>= 0.3.9),
24+
ingredients (>= 0.4.0),
2525
r2d3,
2626
jsonlite
2727
Suggests:
28-
DALEX,
28+
DALEX (>= 0.4.9),
2929
parallelMap,
3030
randomForest,
3131
knitr,

NEWS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# modelStudio 0.1.9
2+
* This version requires `DALEX 0.4.9` and `ingredients 0.4.0`
3+
14
# modelStudio 0.1.8
2-
* change "Shapley Values" to "SHAP Values"
3-
* Lower `B` default value from 25 to 15
5+
* change `Shapley Values` to `SHAP Values`
6+
* Lower `B` default value from 25 to 15, `N` default value from 500 to 400
47

58
# modelStudio 0.1.7
69
* fix tests for CRAN

R/modelStudio.R

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' @title Generates interactive studio to explain predictive model
1+
#' @title Generate Interactive Studio with Explanations for the Model
22
#'
33
#' @description
44
#' This tool uses your model, data and new observations, to provide local
@@ -7,29 +7,29 @@
77
#'
88
#' Find more details about plots in \href{https://pbiecek.github.io/PM_VEE/}{Predictive Models: Explore, Explain, and Debug}
99
#'
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()}.
1919
#' See \href{https://modeloriented.github.io/modelStudio/articles/vignette_modelStudio.html#parallel-computation}{\bold{vignette}}.
2020
#' @param viewer Default is \code{external} to display in an external RStudio window.
2121
#' Use \code{browser} to display in an external browser or
2222
#' \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
2424
#' \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.
2727
#' 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}.
3131
#'
32-
#' @return an object of the \code{r2d3} class
32+
#' @return An object of the \code{r2d3} class.
3333
#'
3434
#' @importFrom utils head tail setTxtProgressBar txtProgressBar installed.packages
3535
#' @importFrom stats aggregate predict
@@ -100,7 +100,7 @@ modelStudio.explainer <- function(object,
100100
facet_dim = c(2,2),
101101
time = 500,
102102
max_features = 10,
103-
N = 500,
103+
N = 400,
104104
B = 15,
105105
show_info = TRUE,
106106
parallel = FALSE,
@@ -139,7 +139,7 @@ modelStudio.default <- function(object,
139139
facet_dim = c(2,2),
140140
time = 500,
141141
max_features = 10,
142-
N = 500,
142+
N = 400,
143143
B = 15,
144144
show_info = TRUE,
145145
parallel = FALSE,

R/modelStudioOptions.R

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#' @title Get modified options for modelStudio
1+
#' @title Modifiy options and pass them to modelStudio
22
#'
33
#' @description This function returns default options for \code{\link{modelStudio}}.
4-
#' It is possible to modify values of this list and pass it to \code{options}
4+
#' It is possible to modify values of this list and pass it to the \code{options}
55
#' parameter in the main function. \strong{WARNING: Editing default options may cause
66
#' unintended behavior.}
77
#'
8-
#' @param ... options to change, \code{option_name = value}.
8+
#' @param ... Options to change, \code{option_name = value}.
99
#'
10-
#' @return \code{list} of options for modelStudio
10+
#' @return \code{list} of options for \code{modelStudio}.
1111
#'
1212
#' \subsection{Main options:}{
1313
#' \describe{
1414
#' \item{scale_plot}{\code{TRUE} Makes every plot the same height, ignores \code{bar_width}.}
15-
#' \item{show_subtitle}{\code{TRUE} Should subtitle be displayed?}
15+
#' \item{show_subtitle}{\code{TRUE} Should the subtitle be displayed?}
1616
#' \item{subtitle}{\code{label} parameter from \code{explainer}.}
17-
#' \item{margin_*}{plot margins. Change \code{margin_left} for longer/shorter axis labels.}
17+
#' \item{margin_*}{Plot margins. Change \code{margin_left} for longer/shorter axis labels.}
1818
#' \item{w}{\code{420} in px. Inner plot width.}
1919
#' \item{h}{\code{280} in px. Inner plot height.}
2020
#' \item{bar_width}{\code{16} in px. Default width of bars for all plots,
@@ -32,13 +32,13 @@
3232
#' one of \code{[bd,sv,cp,fi,pd,ad,fd]}.\cr
3333
#'
3434
#' \describe{
35-
#' \item{**_title}{plot specific title. Default varies.}
36-
#' \item{**_subtitle}{plot specific subtitle. Default is \code{subtitle}.}
37-
#' \item{**_bar_width}{plot specific width of bars. Default is \code{bar_width},
35+
#' \item{**_title}{Plot specific title. Default varies.}
36+
#' \item{**_subtitle}{Plot specific subtitle. Default is \code{subtitle}.}
37+
#' \item{**_bar_width}{Plot specific width of bars. Default is \code{bar_width},
3838
#' ignored when \code{scale_plot = TRUE}.}
39-
#' \item{**_line_size}{\code{line_size} plot specific width of lines. Default is \code{line_size}.}
40-
#' \item{**_point_size}{plot specific point radius. Default is \code{point_size}.}
41-
#' \item{**_*_color}{plot specific \code{[bar,line,point]} color. Default is \code{[bar,line,point]_color}.}
39+
#' \item{**_line_size}{\code{line_size} Plot specific width of lines. Default is \code{line_size}.}
40+
#' \item{**_point_size}{Plot specific point radius. Default is \code{point_size}.}
41+
#' \item{**_*_color}{Plot specific \code{[bar,line,point]} color. Default is \code{[bar,line,point]_color}.}
4242
#' }
4343
#' }
4444
#'

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
[![Build Status](https://travis-ci.org/ModelOriented/modelStudio.svg?branch=master)](https://travis-ci.org/ModelOriented/modelStudio)
66
[![Coverage Status](https://codecov.io/gh/ModelOriented/modelStudio/branch/master/graph/badge.svg)](https://codecov.io/github/ModelOriented/modelStudio?branch=master)
77
[![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat)
8+
[![JOSS-status](https://joss.theoj.org/papers/9eec8c9d1969fbd44b3ea438a74af911/status.svg)](https://joss.theoj.org/papers/9eec8c9d1969fbd44b3ea438a74af911)
89

910
## Overview
1011

1112
The `modelStudio` package automates explanation of machine learning predictive models. This package generates advanced interactive and animated model explanations in the form of a serverless HTML site.
1213

1314
It combines **R** with **D3.js** to produce plots and descriptions
14-
for local and global explanations. The whole is greater than the sum of its parts,
15-
so it also supports EDA (Exploratory Data Analysis) on top of that. `modelStudio` is
16-
a fast and condensed way to get all the answers without much effort. Break down your model
17-
and look into its ingredients with only a few lines of code.
15+
for various local and global explanations. Tools for model exploration unite with
16+
tools for EDA (Exploratory Data Analysis) to give a broad overview of the model behaviour.
17+
`modelStudio` is a fast and condensed way to get all the answers without much effort. Break down your model and look into its ingredients with only a few lines of code.
1818

1919
[See a demo](https://modeloriented.github.io/modelStudio/demo.html) &emsp; [Read the vignette: modelStudio - perks and features](https://modeloriented.github.io/modelStudio/articles/vignette_modelStudio.html)
2020

@@ -36,8 +36,6 @@ devtools::install_github("ModelOriented/modelStudio")
3636

3737
This package bases on `DALEX` explainers created with `DALEX::explain()`.
3838

39-
**Demo works on the new version of DALEX** ``` devtools::install_github("ModelOriented/DALEX") ```
40-
4139
```r
4240
library("modelStudio")
4341

@@ -86,4 +84,4 @@ and [`r2d3::save_d3_png()`](https://rstudio.github.io/r2d3/articles/publishing.h
8684

8785
## Acknowledgments
8886

89-
Work on this package was financially supported by the 'NCN Opus grant 2016/21/B/ST6/02176'.
87+
Work on this package was financially supported by the `NCN Opus grant 2016/21/B/ST6/02176`.

docs/404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CONTRIBUTING.html

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

0 commit comments

Comments
 (0)