Skip to content

Commit

Permalink
Merge pull request #19 from ModelOriented/master
Browse files Browse the repository at this point in the history
update branch
  • Loading branch information
hbaniecki authored May 16, 2019
2 parents 3da3022 + df2a2e5 commit 46ca933
Show file tree
Hide file tree
Showing 49 changed files with 407 additions and 186 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ingredients
Title: Effects and Importances of Model Ingredients
Version: 0.3.2
Version: 0.3.3
Authors@R: c(person("Przemyslaw", "Biecek", email = "przemyslaw.biecek@gmail.com",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-8423-1823")),
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export(partial_dependency)
export(plotD3)
export(select_neighbours)
export(select_sample)
export(show_aggreagated_profiles)
export(show_aggregated_profiles)
export(show_observations)
export(show_profiles)
export(show_residuals)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ingredients 0.3.3
----------------------------------------------------------------
* `show_profiles` and `show_residuals` functions extend Ceteris Paribus Plots.
* `show_aggreagated_profiles` is renamed to `show_aggregated_profiles`
* centering of ggplot2 title

ingredients 0.3.2
----------------------------------------------------------------
* added new functions `describe()` and `print.ceteris_paribus_descriptions()` for text based descriptions of Ceteris Paribus explainers
Expand Down
2 changes: 1 addition & 1 deletion R/aggreagate_profiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_rugs(cp_rf, variables = "age", color = "red") +
#' show_aggreagated_profiles(pdp_rf, size = 3, color = "_label_")
#' show_aggregated_profiles(pdp_rf, size = 3, color = "_label_")
#' }
#' @export
aggregate_profiles <- function(x, ...,
Expand Down
4 changes: 2 additions & 2 deletions R/cluster_profiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
#' head(clust_rf)
#'
#' plot(clust_rf, color = "_label_") +
#' show_aggreagated_profiles(pdp_rf, color = "black", size = 3)
#' show_aggregated_profiles(pdp_rf, color = "black", size = 3)
#'
#' plot(cp_rf, color = "grey", variables = "age") +
#' show_aggreagated_profiles(clust_rf, color = "_label_", size = 2)
#' show_aggregated_profiles(clust_rf, color = "_label_", size = 2)
#'
#' clust_rf <- cluster_profiles(cp_rf, k = 3, center = TRUE, variables = "age")
#' head(clust_rf)
Expand Down
4 changes: 2 additions & 2 deletions R/plot_aggregated_ceteris_paribus_explainer.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Adds a Layer with Aggregated Profiles
#'
#' Function 'show_aggreagated_profiles' adds a layer to a plot created with 'plot.ceteris_paribus_explainer'.
#' Function 'show_aggregated_profiles' adds a layer to a plot created with 'plot.ceteris_paribus_explainer'.
#'
#' @param x a ceteris paribus explainer produced with function `ceteris_paribus()`
#' @param ... other explainers that shall be plotted together
Expand Down Expand Up @@ -62,7 +62,7 @@
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_rugs(cp_rf, variables = "age", color = "red") +
#' show_aggreagated_profiles(pdp_rf_p, size = 2)
#' show_aggregated_profiles(pdp_rf_p, size = 2)
#'
#' }
#' @export
Expand Down
8 changes: 4 additions & 4 deletions R/show_aggregated_profiles.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Adds a Layer with Aggregated Profiles
#'
#' Function 'show_aggreagated_profiles' adds a layer to a plot created with 'plot.ceteris_paribus_explainer'.
#' Function 'show_aggregated_profiles' adds a layer to a plot created with 'plot.ceteris_paribus_explainer'.
#'
#' @param x a ceteris paribus explainer produced with function `ceteris_paribus()`
#' @param ... other explainers that shall be plotted together
Expand All @@ -27,7 +27,7 @@
#' pdp_rf <- aggregate_profiles(cp_rf, variables = "age")
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_aggreagated_profiles(pdp_rf, size = 3)
#' show_aggregated_profiles(pdp_rf, size = 3)
#'
#' \donttest{
#' library("randomForest")
Expand All @@ -48,13 +48,13 @@
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_rugs(cp_rf, variables = "age", color = "red") +
#' show_aggreagated_profiles(pdp_rf, size = 3)
#' show_aggregated_profiles(pdp_rf, size = 3)
#'
#' plot(pdp_rf, variables = "age", color = "grey")
#'
#' }
#' @export
show_aggreagated_profiles <- function(x, ...,
show_aggregated_profiles <- function(x, ...,
size = 0.5,
alpha = 1,
color = "#371ea3",
Expand Down
4 changes: 2 additions & 2 deletions R/show_rugs.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' pdp_rf <- aggregate_profiles(cp_rf, variables = "age")
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_aggreagated_profiles(pdp_rf, size = 3)
#' show_aggregated_profiles(pdp_rf, size = 3)
#'
#' \donttest{
#' library("randomForest")
Expand All @@ -51,7 +51,7 @@
#' plot(cp_rf, variables = "age") +
#' show_observations(cp_rf, variables = "age") +
#' show_rugs(cp_rf, variables = "age", color = "red") +
#' show_aggreagated_profiles(pdp_rf, size = 3)
#' show_aggregated_profiles(pdp_rf, size = 3)
#'
#' plot(pdp_rf, variables = "age", color = "grey")
#'
Expand Down
12 changes: 6 additions & 6 deletions R/theme_drwhy.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ theme_drwhy <- function() {
axis.line.y = element_line(color = "white"),
axis.ticks.y = element_line(color = "white"),
#axis.line = element_line(color = "#371ea3", size = 0.5, linetype = 1),
plot.title = element_text(color = "#371ea3", size = 16),
plot.subtitle = element_text(color = "#371ea3", size = 14),
plot.title = element_text(color = "#371ea3", size = 16, hjust = 0),
plot.subtitle = element_text(color = "#371ea3", size = 14, hjust = 0),
axis.title = element_text(color = "#371ea3"),
axis.text = element_text(color = "#371ea3", size = 10),
strip.text = element_text(color = "#371ea3", size = 12, hjust = 0, margin = margin(0, 0, 1, 0)),
Expand All @@ -36,8 +36,8 @@ theme_drwhy_vertical <- function() {
legend.direction = "horizontal", legend.position = "top",
axis.line.x = element_line(color = "white"),
axis.ticks.x = element_line(color = "white"),
plot.title = element_text(color = "#371ea3", size = 16),
plot.subtitle = element_text(color = "#371ea3", size = 14),
plot.title = element_text(color = "#371ea3", size = 16, hjust = 0),
plot.subtitle = element_text(color = "#371ea3", size = 14, hjust = 0),
#axis.line = element_line(color = "#371ea3", size = 0.5, linetype = 1),
axis.title = element_text(color = "#371ea3"),
axis.text = element_text(color = "#371ea3", size = 10),
Expand All @@ -56,8 +56,8 @@ theme_drwhy_blank <- function() {
panel.border = element_blank(), strip.background = element_blank(),
plot.background = element_blank(), complete = TRUE,
legend.direction = "horizontal", legend.position = "top",
plot.title = element_text(color = "#371ea3", size = 16),
plot.subtitle = element_text(color = "#371ea3", size = 14),
plot.title = element_text(color = "#371ea3", size = 16, hjust = 0),
plot.subtitle = element_text(color = "#371ea3", size = 14, hjust = 0),
axis.line.x = element_line(color = "white"),
axis.ticks.x = element_line(color = "white"),
axis.title = element_text(color = "#371ea3"),
Expand Down
52 changes: 26 additions & 26 deletions docs/articles/vignette_titanic.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 6 additions & 64 deletions docs/reference/aggregate_profiles.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/reference/cluster_profiles.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/feature_importance-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions docs/reference/feature_importance.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/partial_dependency-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/partial_dependency-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/partial_dependency-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/reference/partial_dependency.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/plot.aggregated_profiles_explainer-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/plot.aggregated_profiles_explainer-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/plot.aggregated_profiles_explainer-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/plot.aggregated_profiles_explainer-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 46ca933

Please sign in to comment.