← Back to all sparks
B

BORG

ANALYTICS
Velocity0.0

Bounded Outcome Risk Guard for Model Evaluation

A cross-validation guard that refuses to run random CV on dependent data unless you insist

cross-validationspatial-statisticsmodel-validationreproducibilitytidymodelsr-package
Current state
BORG detects spatial, temporal and clustered dependence in a modelling dataset and generates a cross-validation scheme that respects it — spatial blocks, temporal blocks, group folds — rather than letting random splits leak information between train and test. Its distinguishing choice is enforcement: when it finds dependence, random CV is blocked outright and needs an explicit allow_random=TRUE to proceed. The package also wraps the standard rsample and caret entry points so the guard applies inside existing workflows.
Where it's heading
The entire visible history is a single day, and the sequence within it is coherent rather than churn: enforcement first, then the evidence layer, then framework integration, then idiomatic R polish. The evidence work matters to the pitch — borg_compare_cv() runs random against blocked CV so users see the inflation on their own data instead of taking the warning on faith, and the methods-text and certificate exports are aimed squarely at getting this into published papers. By the final release the interface has been rebuilt on standard S3 plot and summary methods.
Prediction
The wrappers so far cover rsample and caret; tidymodels and mlr3 are the obvious remaining entry points if the guard is to reach the workflows it hasn't yet intercepted.

Recent moves

  1. 7mo ago

    Interface rebuilt on standard S3 plot and summary methods

    Replaces the package's custom functions with S3 plot() and summary() methods across its result classes, so the objects behave the way R users expect. It also splits certificate creation into a dedicated export path, closing out the day's build-up with interface polish rather than new capability.

    View source ↗
  2. 7mo ago

    Guarded wrappers for rsample and caret splitting functions

    Adds guarded versions of vfold_cv(), group_vfold_cv(), initial_split() and trainControl(), plus a hook system that runs validation automatically. This is what moves the guard from an opt-in tool to something that sits on the splitting functions people already call.

    View source ↗
  3. 7mo ago

    Empirical inflation comparison and publication-ready reporting

    borg_compare_cv() runs random against blocked CV on the user's own data to show the optimism gap directly, while methods-text generation and YAML/JSON certificates target the manuscript workflow. It supplies the evidence for the claim the previous release enforces.

    View source ↗
  4. 7mo ago

    Random CV blocked by default when dependence is detected

    ⚡ SPARK

    Unifies the package behind a single borg() entry point with diagnosis and validation modes, and makes the opinionated call the package is built on: if spatial, temporal or clustered dependence is found, random cross-validation is refused unless explicitly overridden.

    View source ↗
  5. 7mo ago

    Version bump to 0.1.1

    A version bump with no functional content, hours before the substantive releases. It marks the starting line for the day's work rather than contributing to it.

    View source ↗