Subsections of Configuration
Donor Configuration
| Key | Type/default | Contract |
|---|---|---|
schema_version |
string, 1.0 |
Config version. |
data_path |
string | Long CSV containing date, location, and Y or metric. |
date_format |
string or omitted | Explicit source date format. |
treatment_locations |
list | Treated identifiers, compared after string conversion. |
treatment_date |
string | Pre/post split; only pre-period rows are scored. |
max_donors |
integer, 10 |
Maximum complete recommendations per treated unit. |
min_correlation_threshold |
float, 0.7 |
Adds low-correlation warnings. |
max_rmse_threshold |
float or null | Adds high-RMSE warnings. |
donor_dominance_threshold |
float, 0.5 |
Adds dominance warnings for recommendation weights. |
min_excellent_donors |
integer, 3 |
Pool-summary threshold. |
min_good_donors |
integer, 5 |
Pool-summary threshold. |
mape_thresholds |
mapping | acceptable (default 30) controls high-MAPE warnings; other labels are retained compatibility settings. |
shapemap_file |
string or null | GeoPandas-readable vector file. |
shapemap_id_column |
string | Geography key in the vector file. |
output_dir |
string | Artefact directory. |
parallel |
boolean | Parallel pair scoring. |
n_jobs |
integer | Worker count; -1 uses all cores. |
The current donor stage always computes correlation, RMSE, MAPE, and DTW.
There are no active evaluation_metrics, pre_treatment_periods, min_donors,
limit_donor_pool, top_correlated_donors, acceptable_mape, or
correlation_thresholds keys.
Inference Configuration
The shipped inference YAML is the canonical example. Active keys are listed
below; unknown non-sparse_sc_* keys are not comprehensively rejected, so a
misspelling can be ignored. Compare production configs with this table.
| Key | Type/default | Contract |
|---|---|---|
schema_version |
string, 1.0 |
Supported config schema. |
data_path |
string | Input CSV for file mode. |
location_col_name |
string | Geography identifier column. |
date_col_name |
string | Period column. |
date_format |
string | Explicit pandas date format. |
outcome_col_name |
string | Numeric outcome column. |
covariate_col_names |
list or null | Optional covariates passed to the loader. |
treatment_unit_ids |
list | Treated geography identifiers. |
intervention_date_str |
string | First observed treated period. |
cooldown_periods |
non-negative integer, 0 |
Observed periods excluded after launch. |
measurement_start_date_str |
string or null | Optional explicit start; must agree with cooldown. |
duplicate_policy |
error, mean, sum |
Duplicate unit-period handling. |
missing_outcome_policy |
error, drop_unit, drop_period, impute_with_report |
Incomplete-panel handling. |
min_pre_treatment_periods |
integer | Minimum pre-period observations when supplied. |
min_post_treatment_periods |
integer | Minimum measured post-period observations when supplied. |
estimator |
sparsesc |
Only implemented estimator selector. |
output_dir |
string | Artefact directory. |
create_plots |
boolean | CLI plot default. |
SparseSC runtime keys:
| Key | Default or role |
|---|---|
sparse_sc_model_type |
SparseSC model type, normally retrospective. |
sparse_sc_fast_estimation |
Selects SparseSC fast fitting path. |
sparse_sc_return_ci |
Requests placebo confidence intervals. |
sparse_sc_T0, sparse_sc_T1 |
SparseSC history-length controls; not cooldown semantics. |
sparse_sc_max_n_pl |
Maximum placebo assignments used. |
sparse_sc_placebo_seed |
Non-negative seed for sampled placebo assignments; default 110011. |
sparse_sc_level |
Requested interval level. |
sparse_sc_lasso_max_iter, sparse_sc_lasso_tol |
Forwarded as fast-path CV options; the RidgeCV-backed path may ignore them. They do not configure the full path. |
sparse_sc_cv_folds, sparse_sc_scoring, sparse_sc_gcv_mode |
Supported adapter controls. |
Assumption keys are run_assumption_checks, require_assumption_checks,
fail_on_assumption_error, parallel_trends_method, spillover_method, and
assumption_alpha. Only the parallel-trends diagnostic is gate-eligible. The
interference screen is always advisory.
The non-prefixed compatibility keys lasso_selection,
lasso_fit_intercept, and lasso_normalize are forwarded only when the fast
path is selected. Their support depends on the installed scikit-learn API;
prefer the documented sparse_sc_* controls for new configurations.
There is no active treatment_col or end_date key. Define treatment through
treatment_unit_ids; trim the input panel to a pre-specified end date. Inference
also does not consume shapemap_file or shapemap_id_column; shapemap-backed
maps belong to the donor stage.
Power Configuration
| Key | Type/default | Contract |
|---|---|---|
schema_version |
string, 1.0 |
Config version. |
data_path |
string | Long CSV. |
date_col, location_col, outcome_col |
strings | Source columns. |
treatment_locations |
list | Treated units; numeric-looking strings are coerced to integers. |
treatment_date |
string | Split used to estimate the pre-period DGP. |
duration |
list of integers | Simulated post-period lengths. Alias: test_durations. |
effect_sizes |
list of floats | Relative injected lifts. Alias: effect_size. |
alpha |
float, 0.05 |
Detection threshold; must be in (0, 1). |
target_power |
float, 0.80 |
CLI MDE/report threshold; must be in (0, 1]. |
n_simulations |
integer, 1000 |
Repetitions per grid row. |
effect_pattern |
string, constant |
constant, immediate, ramp, or decay. |
random_seed |
integer or null | Reproducible configuration seed. |
power_dgp_rank |
integer or null | Explicit SVD rank. |
power_dgp_max_rank |
integer, 5 in CLI |
Automatic rank cap. |
power_failure_rate_threshold |
float, 0.20 |
Maximum valid row failure rate. |
sparse_sc_max_n_pl |
positive integer, 100 |
Requested placebo cap. |
parallel, n_jobs |
boolean, integer | Grid-level CPU parallelism. |
use_gpu |
boolean | Optional unseeded DGP acceleration request. |
output_dir |
string | CSV and plot directory. |
constant and immediate currently produce the same full effect in every
period. ramp moves linearly from zero to the full effect. decay applies the
full effect initially and a hard-coded exponential decay rate of 0.1 per
period. Unknown patterns fail.
The CLI power path forwards a deliberately narrower SparseSC configuration than inference: fast estimation, placebo cap, DGP controls, seed, GPU request, and progress state. Inference options such as cooldown, assumption checks, CI level, and lasso controls are not inherited.