plotResiduals: Create residual plots for prediction objects or benchmark...

View source: R/plotResiduals.R

plotResidualsR Documentation

Create residual plots for prediction objects or benchmark results.

Description

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

Usage

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

Other plot: createSpatialResamplingPlots(), plotBMRBoxplots(), plotBMRRanksAsBarChart(), plotBMRSummary(), plotCalibration(), plotCritDifferences(), plotLearningCurve(), plotPartialDependence(), plotROCCurves(), plotThreshVsPerf()


berndbischl/mlr documentation built on Aug. 15, 2024, 4:20 p.m.