Skip to contents

Creates a ggplot2 visualization of detected risks from a BORG validation.

Usage

# S3 method for class 'BorgRisk'
autoplot(object, max_risks = 10, show_fixes = TRUE, ...)

Arguments

object

A BorgRisk object from borg_inspect() or borg() in validation mode.

max_risks

Integer. Maximum number of risks to display. Default: 10.

show_fixes

Logical. If TRUE (default), annotate each risk with a suggested fix from borg_assimilate() or manual action. If FALSE, show the risk description instead.

...

Additional arguments (currently unused).

Value

A ggplot object.

Details

Requires the ggplot2 package.

Examples

# \donttest{
if (requireNamespace("ggplot2", quietly = TRUE)) {
  data <- data.frame(x = 1:100, y = 101:200)
  result <- borg_inspect(data, train_idx = 1:60, test_idx = 51:100)
  ggplot2::autoplot(result)
}
# }