R/print_predict_diagnostics.R

Defines functions print.predict_diagnostics

Documented in print.predict_diagnostics

#' Print Instance Level Residual Diagnostics
#'
#' Generic function
#'
#' @param x an object with instance level residual diagnostics created with \code{\link{predict_diagnostics}} function
#' @param ... other parameters
#'
#' @export
print.predict_diagnostics <- function(x, ...) {
  if (is.null(x$variables)) {
    res <- x$test
  } else {
    res <- x$cp_new_instance
  }
  print(res)
}
ModelOriented/DALEX documentation built on July 28, 2021, 6:40 p.m.