ModelOriented / DALEX

Compare 637e4bd ... +14 ... 0bd9bec

Showing 12 of 51 files from the diff.
Other files ignored by Codecov
man/explain.Rd has changed.
man/titanic.Rd has changed.
tox.ini has changed.
man/yhat.Rd has changed.
NEWS.md has changed.
NAMESPACE has changed.
DESCRIPTION has changed.
R/data_titanic.R has changed.

@@ -2,7 +2,7 @@
Loading
2 2
#'
3 3
#' This function calculates explanations on a dataset level set that explore model response as a function of selected variables.
4 4
#' The explanations can be calulated as Partial Dependence Profile or  Accumulated Local Dependence Profile.
5 -
#' Find information how to use this function here: \url{https://pbiecek.github.io/ema/partialDependenceProfiles.html}.
5 +
#' Find information how to use this function here: \url{http://ema.drwhy.ai/partialDependenceProfiles.html}.
6 6
#' The \code{variable_profile} function is a copy of \code{model_profile}.
7 7
#'
8 8
#' Underneath this function calls the \code{\link[ingredients]{partial_dependence}} or
@@ -22,7 +22,7 @@
Loading
22 22
#' @return An object of the class \code{model_profile}.
23 23
#' It's a data frame with calculated average model responses.
24 24
#'
25 -
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{https://pbiecek.github.io/ema/}
25 +
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{http://ema.drwhy.ai/}
26 26
#'
27 27
#' @name model_profile
28 28
#' @examples

@@ -10,7 +10,7 @@
Loading
10 10
                    quick.installed.packages())
11 11
12 12
  packageStartupMessage("Welcome to DALEX (version: ", utils::packageVersion("DALEX"), ").\n",
13 -
    "Find examples and detailed introduction at: https://pbiecek.github.io/ema/\n",
13 +
    "Find examples and detailed introduction at: http://ema.drwhy.ai/\n",
14 14
    ifelse(length(addons) == 0, "",
15 15
    paste0( "Additional features will be available after installation of: ",
16 16
            paste(addons, collapse = ", "),".\nUse 'install_dependencies()' to get all suggested dependencies"))

@@ -2,7 +2,7 @@
Loading
2 2
#'
3 3
#' This function calculated individual profiles aka Ceteris Paribus Profiles.
4 4
#' From DALEX version 1.0 this function calls the \code{\link[ingredients]{ceteris_paribus}} from the \code{ingredients} package.
5 -
#' Find information how to use this function here: \url{https://pbiecek.github.io/ema/ceterisParibus.html}.
5 +
#' Find information how to use this function here: \url{http://ema.drwhy.ai/ceterisParibus.html}.
6 6
#'
7 7
#' @param explainer a model to be explained, preprocessed by the \code{explain} function
8 8
#' @param new_observation a new observation for which predictions need to be explained
@@ -14,7 +14,7 @@
Loading
14 14
#' @return An object of the class \code{ceteris_paribus_explainer}.
15 15
#' It's a data frame with calculated average response.
16 16
#'
17 -
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{https://pbiecek.github.io/ema/}
17 +
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{http://ema.drwhy.ai/}
18 18
#' @export
19 19
#'
20 20
#' @examples

@@ -232,6 +232,20 @@
Loading
232 232
  response
233 233
}
234 234
235 +
#' @rdname yhat
236 +
#' @export
237 +
yhat.function <- function(X.model, newdata, ...) {
238 +
  response <- X.model(newdata, ...)
239 +
  if (!is.null(dim(response))) {
240 +
    if (!is.null(attr(X.model, "predict_function_target_column"))) {
241 +
      response <- response[,attr(X.model, "predict_function_target_column")]
242 +
    } else if (ncol(response) == 2 & is.null(attr(X.model, "predict_function_target_column"))) {
243 +
      response <- response[, 2]
244 +
    }
245 +
  }
246 +
  response
247 +
}
248 +
235 249
236 250
#' @rdname yhat
237 251
#' @export

@@ -18,7 +18,7 @@
Loading
18 18
#' \item \code{type} - character that specifies type of the task.
19 19
#' }
20 20
#'
21 -
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{https://pbiecek.github.io/ema/}
21 +
#' @references Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. \url{http://ema.drwhy.ai/}
22 22
#' @importFrom stats median weighted.mean
23 23
#' @export
24 24
#' @examples

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R -0.56% 86.81%
Project Totals (31 files) 86.81%
Loading