Skip to content

Commit

Permalink
docs & pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mstaniak committed Nov 12, 2018
1 parent 69411c5 commit dd0db0c
Show file tree
Hide file tree
Showing 26 changed files with 2,505 additions and 1,837 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# live 1.5.9
* Dropped old interface.

* Dropped old interface.
* Improved distance calculations.

# live 1.5.8

Expand Down
3 changes: 2 additions & 1 deletion R/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ live_shiny <- function(train_data, black_box_model, target, explained_data = tra
sliderInput("size", "Size of simulated dataset",
min = 100, max = 10000, step = 100,
round = T, value = 1000),
selectInput("method", "Sampling method", choices = c("live", "lime"),
selectInput("method", "Sampling method",
choices = c("live", "permute", "normal"),
selected = "live"),
checkboxInput("standardize", "Center predictors"),
checkboxInput("selection", "Variable selection"),
Expand Down
12 changes: 6 additions & 6 deletions R/explore.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @return list of class "live_explorer" consisting of
#' \item{data}{Dataset generated by sample_locally function with response variable.}
#' \item{target}{Name of the response variable.}
#' \item{model}{Black box model which is being explained.}
#' \item{explained_instance}{Instance that is being explained.}
#' \item{sampling_method}{Name of used sampling method}
#' \item{fixed_variables}{Names of variables which were not sampled}
Expand All @@ -32,8 +31,7 @@
#' dataset_for_local_exploration <- sample_locally(data = wine,
#' explained_instance = wine[5, ],
#' explained_var = "quality",
#' size = 50,
#' standardise = TRUE)
#' size = 50)
#' }
#'

Expand Down Expand Up @@ -121,11 +119,13 @@ give_predictions <- function(data, black_box, explained_var, similar, predict_fu
#'
#' @examples
#' \dontrun{
#' local_exploration1 <- add_predictions(wine, dataset_for_local_exploration,
#' black_box_model = "regr.svm")
#' # Train a model inside add_predictions call.
#' local_exploration1 <- add_predictions(dataset_for_local_exploration,
#' black_box_model = "regr.svm",
#' data = wine)
#' # Pass trained model to the function.
#' svm_model <- svm(quality ~., data = wine)
#' local_exploration2 <- add_predictions(wine, dataset_for_local_exploration,
#' local_exploration2 <- add_predictions(dataset_for_local_exploration,
#' black_box_model = svm_model)
#' }
#'
Expand Down
2 changes: 1 addition & 1 deletion R/live.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' This package aims to help locally fit and visualize interpretable models similarly to LIME methodology.
#' Interface provided by mlr package is used. Tools are provided to create a simulated dataset of
#' similar observations, fit a chosen white box models (GLM and CART in particular) and visualize
#' similar observations, fit chosen white box models (GLM and CART in particular) and visualize
#' them. The methodology is based on Tulio Ribeiro, Singh, Guestrin (2016) <doi:10.1145/2939672.2939778>.
#' More details can be found in Staniak, Biecek (2018) https://arxiv.org/abs/1804.01955.
#'
Expand Down
12 changes: 1 addition & 11 deletions R/plot.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#' Waterfall plot or forestplot for lm/glm explanations.
#'
#' @param plot_type Chr, "forest" or "waterfall" depending
#' on which type of plot is to be created.
#' @param fitted_model glm or lm object.
#' @param explained_instance Observation around which model was fitted.
#' @param classif logical, if TRUE, probabilities will be plotted
#'
#' @importFrom graphics plot
#'
#' @return plot (ggplot2 or lattice)
#'


plot_regression <- function(plot_type, fitted_model, explained_instance, classif) {
if(plot_type == "forest") {
Expand Down
262 changes: 131 additions & 131 deletions docs/articles/wine_quality.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.
156 changes: 156 additions & 0 deletions docs/authors.html

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

Loading

0 comments on commit dd0db0c

Please sign in to comment.