Holds the result of borg_inspect or borg_validate:
a structured assessment of evaluation risks detected in a workflow or object.
This class stores identified risks, their classification (hard violation vs soft inflation), affected data indices, and recommended remediation actions.
Slots
risksA list of detected risk objects, each containing:
- type
Character string: risk category (e.g., "preprocessing_leak")
- severity
Character string: "hard_violation" or "soft_inflation"
- description
Character string: human-readable description
- affected_indices
Integer vector: row/column indices affected
- source_object
Character string: name of the leaky object
n_hardInteger. Count of hard violations detected.
n_softInteger. Count of soft inflation risks detected.
is_validLogical. TRUE if no hard violations detected.
train_indicesInteger vector. Row indices in training set.
test_indicesInteger vector. Row indices in test set.
timestampPOSIXct. When the inspection was performed.
callLanguage object. The original call that triggered inspection.
Examples
# Create an empty BorgRisk object (no risks detected)
show(new("BorgRisk",
risks = list(),
n_hard = 0L,
n_soft = 0L,
is_valid = TRUE,
train_indices = 1:80,
test_indices = 81:100,
timestamp = Sys.time(),
call = quote(borg_inspect(x))
))