| plot.BorgRisk | R Documentation |
S3 plot method for BORG risk assessment objects.
## S3 method for class 'BorgRisk'
plot(x, title = NULL, max_risks = 10, ...)
x |
A |
title |
Optional custom plot title. |
max_risks |
Maximum number of risks to display. Default: 10. |
... |
Additional arguments (currently unused). |
Displays a visual summary of detected risks:
Hard violations shown in red
Soft inflation risks shown in yellow/orange
Green "OK" when no risks detected
Invisibly returns NULL. Called for plotting side effect.
# No risks
data <- data.frame(x = 1:100, y = 101:200)
result <- borg_inspect(data, train_idx = 1:70, test_idx = 71:100)
plot(result)
# With overlap violation
result_bad <- borg_inspect(data, train_idx = 1:60, test_idx = 51:100)
plot(result_bad)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.