Plots for model diagnostics. Provides scatterplots of true vs. predicted values and histograms of the model's residuals.

plotResiduals(
  obj,
  type = "scatterplot",
  loess.smooth = TRUE,
  rug = TRUE,
  pretty.names = TRUE
)

Arguments

obj

(Prediction | BenchmarkResult)
Input data.

type

Type of plot. Can be “scatterplot”, the default. Or “hist”, for a histogram, or in case of classification problems a barplot, displaying the residuals.

loess.smooth

(logical(1))
Should a loess smoother be added to the plot? Defaults to TRUE. Only applicable for regression tasks and if type is set to scatterplot.

rug

(logical(1))
Should marginal distributions be added to the plot? Defaults to TRUE. Only applicable for regression tasks and if type is set to scatterplot.

pretty.names

(logical(1))
Whether to use the short name of the learner instead of its ID in labels. Defaults to TRUE.
Only applicable if a BenchmarkResult is passed to obj in the function call, ignored otherwise.

Value

ggplot2 plot object.

See also