ca-cube / _backup /configs /model_v2_ca.yaml
Konuktor92's picture
backup _backup/configs 17:44:24
7373b33 verified
Raw History Blame Contribute Delete
4 kB
# TrendeX expected-greenness for Central Asia, protocol v2-ca.
# Locked BEFORE the first fit (git). Differs from v1 (Naryn) only where the CA data force it; listed below.
# Budget constraint: the whole run must fit the remaining Vast credit, hence the smaller tuning/seed budget.
name: expected-greenness-ca
version: v2-ca
question: >
How much of each pasture cell's summer greenness anomaly in Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan and
Uzbekistan is explained by weather (IMERG precipitation, GLDAS air temperature, soil moisture, snow) and terrain?
Residual = change not explained by weather (never called a cause).
data:
cube: TrendeX90/ca-cube
cells: mask_reason is null # excludes water, ice, urban, too_steep (>35 deg), barren, cropland, forest
months: [5, 6, 7, 8, 9]
years: [2001, 2025]
target_rows: ndvi_ok == true
training_sample: {cells: 150000, sampling: uniform random over eligible cells, seed: 0}
prediction: every eligible cell (out-of-fold, see cross_fit)
target:
name: ndvi_anomaly
definition: ndvi - clim(cell, month)
climatology: training years of the current split only; leave-own-year-out for training rows
features:
static: [elev_mean, elev_std, slope_mean, steep_share, aspect_sin, aspect_cos, tpi, grass_frac, barren_frac, crop_frac, lc_type1, lat]
calendar: [month]
climatology: [clim_ndvi]
weather_anomalies: # value - 2001-2025 mean of the same cell and month
- precip_m # IMERG, this month
- precip_2m # this + previous month (Apr available for May)
- precip_winter # Oct (previous year) .. Mar sum
- tair_m # GLDAS air temperature, this month
- tair_prev # previous month
- soil_m # GLDAS 0-10 cm soil moisture
- swe_apr # GLDAS snow water equivalent in April
changes_vs_v1:
- "MODIS LST/snow replaced by GLDAS tair/swe (MODIS 8-day products for all of CA are too large for the budget)"
- "precip_3m -> precip_2m (the CA cube keeps Apr-Oct only); winter window Oct-Mar instead of Oct-Apr"
- "lat added as a static feature: the region spans 35-55 N, so latitude carries day length / season length; x/lon and year still excluded"
- "crop_frac added as a static feature"
excluded_on_purpose: [year, lon, x, y, any NDVI lag]
splits:
temporal_test: {train: [2001, 2019], test: [2020, 2025]}
spatial_test: {kind: GroupKFold, folds: 5, group: superblock_33x33_cells}
cross_fit_for_residuals: {kind: contiguous_year_blocks, blocks: [[2001, 2005], [2006, 2010], [2011, 2015], [2016, 2020], [2021, 2025]]}
inner_validation_for_tuning: {train: [2001, 2015], valid: [2016, 2019]}
baselines:
B0_climatology: anomaly = 0
B1_ridge: Ridge on the same standardized features, alpha chosen on the inner split
model:
kind: xgboost
params_fixed: {tree_method: hist, device: cuda, objective: "reg:squarederror"}
tuning: {sampler: optuna_tpe, max_minutes: 10, max_trials: 20}
seeds: [0, 1, 2]
metrics:
primary: skill_vs_ridge = 1 - MSE_model / MSE_ridge
others: [rmse, mae, skill_vs_climatology, anomaly_correlation, tercile_balanced_accuracy]
uncertainty: {temporal: bootstrap over test years, spatial: bootstrap over superblocks, resamples: 2000}
gate:
rule: ship xgboost only if the 95% CI lower bound of skill_vs_ridge > 0 on BOTH temporal and spatial tests
otherwise: ship ridge and say so
intervals: {method: split conformal on inner-split residuals per month, levels: [0.1, 0.9], check: coverage on temporal test}
residual_trends:
series: summer (Jun-Aug) mean of out-of-fold residuals per cell and year; residual referenced to the all-years cell climatology
test: trend.py trend_1d (Hamed-Rao), copied unchanged from the backend
multiple_testing: Benjamini-Hochberg across cells, q < 0.05
min_years: 18
placebo: 200 permutations on a 200,000-cell random subsample
aggregates: [block, region (ADM1), country]