Skip to contents

ledgr_sweep() evaluates a ledgr_param_grid against a ledgr_experiment without writing candidate runs to the experiment store. Sweep is an exploratory surface: it returns candidate summaries, does not rank candidates automatically, and does not create committed run artifacts.

Usage

ledgr_sweep(
  exp,
  param_grid,
  precomputed_features = NULL,
  seed = NULL,
  stop_on_error = FALSE
)

Arguments

exp

A ledgr_experiment.

param_grid

A ledgr_param_grid.

precomputed_features

Optional ledgr_precomputed_features object.

seed

Optional integer-like master seed. When supplied, each candidate receives a deterministic derived execution seed.

stop_on_error

Logical. When FALSE, candidate-level execution errors are captured as failed rows; when TRUE, they are rethrown.

Value

A ledgr_sweep_results tibble.

Details

For larger grids, precompute shared feature payloads with ledgr_precompute_features(). When a grid has more than 20 combinations and precomputed_features = NULL, ledgr warns because feature computation may be repeated per candidate.

The result carries row-level execution_seed and provenance. Provenance records what ran; it does not prove that parameter selection was out-of-sample. The normal discipline is to sweep on a train snapshot, select a candidate with ledgr_candidate(), and evaluate the locked params on a held-out test snapshot with ledgr_promote() or ledgr_run(). Same-snapshot promotion is useful for audit and replay, but remains in-sample.

Failed candidates are retained as rows when stop_on_error = FALSE. Contract errors such as invalid grids, invalid precomputed feature payloads, and Tier 3 strategy preflight failures still abort.

v0.1.8 does not ship automatic ranking, ledgr_tune(), parallel sweep, walk-forward/PBO/CSCV helpers, risk-layer insertion, public cost-model factories, paper/live adapters, intraday-specific support, or full sweep artifact persistence.

Articles

Exploratory sweeps and promotion: vignette("sweeps", package = "ledgr") system.file("doc", "sweeps.html", package = "ledgr")