compare-methods: Methods for learner comparison results.

compare-methodsR Documentation

Methods for learner comparison results.

Description

These methods provide the standard print(), summary(), and plot() interfaces for funcml_compare objects.

Usage

## S3 method for class 'funcml_compare'
print(x, digits = 4L, ...)

## S3 method for class 'funcml_compare'
summary(object, digits = 4L, ...)

## S3 method for class 'funcml_compare'
plot(x, ...)

Arguments

x

A funcml_compare object.

digits

Number of digits numeric columns are rounded to when printed.

...

Additional arguments passed to the underlying method.

object

A funcml_compare object.

Value

print() and summary() return the input object or results table invisibly. plot() returns a ggplot2 object.

Examples

cmp <- compare(
  data = mtcars,
  formula = mpg ~ wt + hp,
  models = c("glm", "rpart"),
  resampling = cv(3, seed = 1),
  metrics = c("rmse", "mae")
)
print(cmp)
summary(cmp)
plot(cmp)

funcml documentation built on Aug. 22, 2026, 5:08 p.m.