plot.regression: Plot of Metrics for Regression Models

View source: R/plot_regression.R

plot.regressionR Documentation

Plot of Metrics for Regression Models

Description

Function plot.regression plots measure of quality of regression models.

Usage

## S3 method for class 'regression'
plot(x, models = NULL, type = "residuals", metric = "rmse", ...)

Arguments

x

An object, returned from train() function.

models

A character or numeric that indicates which models will be presented. If 'NULL' (the default option) then the three best models will be presented.

type

A character one of 'residuals'/'train-test-observed-predicted'/'train-test-rmse' indicates the type of chart.

metric

A character one of 'rmse'/'mse'/'r2'/'mae' indicates the metric on the plots.

...

Other parameters that are necessary for consistency with generic plot function.

Value

a ggplot2 object

Examples

## Not run: 
library('forester')
data('lisbon')

x <- train(lisbon, 'Price', bayes_iter = 0, random_evals = 0)
plot(x)

## End(Not run)


ModelOriented/forester documentation built on June 6, 2024, 7:29 a.m.