autoplot.PredictionRegr: Plot for PredictionRegr

Description Usage Arguments Value Examples

View source: R/PredictionRegr.R

Description

Generates plots for mlr3::PredictionRegr, depending on argument type:

Usage

1
2
## S3 method for class 'PredictionRegr'
autoplot(object, type = "xy", ...)

Arguments

object

(mlr3::PredictionRegr).

type

(character(1)):
Type of the plot. See description.

...

(any): Additional arguments, passed down to the respective geom.

Value

ggplot2::ggplot() object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(mlr3)
library(mlr3viz)

task = tsk("boston_housing")
learner = lrn("regr.rpart")
object = learner$train(task)$predict(task)

head(fortify(object))
autoplot(object)
autoplot(object, type = "histogram", binwidth = 1)
autoplot(object, type = "residual")

mlr-org/mlr3viz documentation built on Oct. 13, 2021, 11:43 p.m.