This release replaces custom functions with standard R S3 methods for a more idiomatic interface.
plot(BorgRisk): Visualize risk assessment resultsplot(borg_result): Visualize CV fold splitsplot(borg_comparison): Compare random vs blocked CV resultssummary(BorgDiagnosis): Generate methods section text for publicationssummary(BorgRisk): Summarize detected riskssummary(borg_result): Generate methods text from borg() outputsummary(borg_comparison): Detailed comparison summaryborg_certificate(): Create structured validation certificateborg_export(): Write certificate to YAML/JSON fileborg_plot() - use plot() insteadborg_report() - use summary(), borg_certificate(), or borg_export()plot_split, plot_risk, etc.)borg_methods_text)BORG-guarded versions of common CV functions that block random CV when dependencies detected:
borg_vfold_cv(): Wraps rsample::vfold_cv() with dependency checkingauto_block = TRUE automatically switches to appropriate blocked CVallow_override = TRUE allows proceeding with warning
borg_group_vfold_cv(): Wraps rsample::group_vfold_cv() with additional checks
Warns about dependencies not handled by grouping alone
borg_initial_split(): Wraps rsample::initial_split()
time specifiedWarns about spatial dependencies
borg_trainControl(): Wraps caret::trainControl()
borg_register_hooks(): Register validation hooks on framework functionsborg_unregister_hooks(): Remove registered hooksborg_compare_cv(): Run random vs blocked CV on the same data to empirically demonstrate metric inflationborg_methods_text(): Generate copy-paste methods section text for manuscriptsBORG package citation
borg_certificate(): Create structured validation certificates
Timestamps and version tracking
borg_export(): Export certificates to YAML or JSON format
borg() entry point with two modes:Diagnosis mode: borg(data, coords=, time=, groups=) returns diagnosis + CV folds
Validation mode: borg(data, train_idx=, test_idx=) validates existing splits
temporal_col → time, group_col → groups, spatial_cols → coordsBORG now detects data dependency structure and enforces appropriate cross-validation strategies. Random CV is blocked when dependencies are detected.
borg_diagnose(): Automatically detects data dependency structureEstimates metric inflation from using random CV
BorgDiagnosis S4 class: Structured diagnosis results with slots for:
dependency_type: "none", "spatial", "temporal", "clustered", "mixed"severity: "none", "moderate", "severe"recommended_cv: appropriate CV strategyinflation_estimate: estimated AUC/RMSE bias from random CVborg_cv(): Generates valid CV schemes based on diagnosisSpatial blocking: k-means clustering with block size > autocorrelation range
Temporal blocking: chronological splits with embargo periods
allow_random = TRUE)plot_split(): Visualize train/test split distribution with temporal or group structureplot_risk(): Display risk assessment results as horizontal bar chartplot_temporal(): Timeline visualization with gap analysis and look-ahead detectionplot_spatial(): Spatial split visualization with convex hullsplot_groups(): Group-based split visualization with leakage highlightingborg_inspect() to support fitted model objects:lm and glm models (checks data used in fitting)ranger random forest modelsxgboost modelslightgbm modelsparsnip model fitsworkflow objects (tidymodels)audit_predictions(): Validate prediction vectors against expected indicescv_leakage_report(): Generate detailed cross-validation leakage reportsaudit_importance(): Detect feature importance computed on test data (SHAP, permutation)tune_results inspection for tidymodels tuning objectsborg_auto_check() to enable/disable automatic validationborg_options() to query current configurationborg.auto_check, borg.strict, borg.verboseInitial release.
borg_guard(): Creates a validation context for train/test splits with
support for temporal, spatial, and grouped structuresborg_validate(): Comprehensive workflow validation including:borg_inspect(): Inspects preprocessing objects for data leakage:preProcess objectstrainControl objectstidymodels recipe objects
prcomp PCA objects
borg_assimilate(): Assimilates leaky pipelines into compliance (auto-fix)BorgRisk S4 class for structured risk assessment reportspreProcess, trainControl, train objectsrecipe, rsplit, vfold_cv, rset objectsAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.