geoprior.scripts.plot_xfer_impact#
Plot impact transferability.
This figure extends plot_transfer.py by adding
decision-maker oriented diagnostics:
Panels#
Retention vs target baseline (overall): - R² retention = R² / R²_baseline - MAE retention = MAE_baseline / MAE
Horizon retention (H1–H3) for R².
Coverage–sharpness tradeoff (@80) per direction.
Threshold risk skill (optional if eval CSVs exist): - Reliability diagram for exceedance - Brier score summary
Hotspot stability (optional): - Jaccard@K overlap of top-K hotspots - Spearman rank correlation on overlap - Optional error bars (mean ± std) - Optional time-series small multiples
Inputs#
Requires xfer_results.csv (from nat.com/xfer_matrix.py).
For panel (d), it also uses xfer_results.json
if available, to locate per-job csv_eval paths.
Run (module form required)#
python -m scripts plot-xfer-impact --src results/xfer/nansha__zhongshan --split val --calib source
Functions
|
|
|
|
|
|
|
Classes
|
- class geoprior.scripts.plot_xfer_impact.TextFlags(show_legend: 'bool', show_labels: 'bool', show_ticklabels: 'bool', show_title: 'bool', show_panel_titles: 'bool', title: 'str | None')[source]#
Bases:
object- Parameters:
- geoprior.scripts.plot_xfer_impact.render(df, *, split, calib, strategies, directions, rescale_mode, baseline_rescale, horizon_metric, cov_target, threshold, xfer_rows, add_hotspots, hotspot_k, hotspot_score, hotspot_horizon, hotspot_ref, hotspot_style, hotspot_errorbars, out, text)[source]#
- Parameters:
df (DataFrame)
split (str)
calib (str)
rescale_mode (str | None)
baseline_rescale (str)
horizon_metric (str)
cov_target (float)
threshold (float)
add_hotspots (bool)
hotspot_k (int)
hotspot_score (str)
hotspot_horizon (str)
hotspot_ref (str)
hotspot_style (str)
hotspot_errorbars (bool)
out (Path)
text (TextFlags)
- Return type: