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)
}

Try the DALEX package in your browser

Any scripts or data that you put into this service are public.

DALEX documentation built on Jan. 16, 2023, 1:06 a.m.