How sikandar1992/blazar-flare-forecasting works
This repository is a single-script research pipeline for forecasting γ-ray blazar flares from Fermi-LAT light curves. Its documented workflow loads the light curves, identifies flares, constructs causal rolling-window features and WATCH/TRIGGER labels, then trains and evaluates classifiers on a held-out target-source period. It also includes statistical tests and manuscript outputs, plus exploratory XGBoost and dual-threshold alert components. The implementation is concentrated in one large script; the relationships below follow the README’s workflow and capability descriptions, since most source code was not excerpted.
Main entry points: code_final_upload.py TRAIN preprocessing · lc_csv_files.zip Fermi-LAT light curves
Components 19
Light-curve processing
- Fermi-LAT light curves
lc_csv_files.zip - Curve loading
code_final_upload.py - Bayesian-Blocks flares
code_final_upload.py
Forecast construction
- Causal rolling windows
code_final_upload.py - 42 variability features
code_final_upload.py - WATCH/TRIGGER labels
code_final_upload.py - Training dataset
code_final_upload.py
Modeling and evaluation
- TRAIN preprocessing
code_final_upload.py - Calibration and thresholds
code_final_upload.py - Logistic Regression
code_final_upload.py - Polynomial Logistic Regression
code_final_upload.py - Random Forest
code_final_upload.py - Exploratory XGBoost
code_final_upload.py - Dual-threshold alerts
code_final_upload.py - Held-out evaluation
code_final_upload.py - Statistical tests
code_final_upload.py
Analysis outputs
- Figures and tables
code_final_upload.py - Analysis output directory
code_final_upload.py
Other components
- Researcher
Connections 25
- Researcher → Fermi-LAT light curves: provides input
README.md - Fermi-LAT light curves → Curve loading: loads curves
README.md - Curve loading → Bayesian-Blocks flares: identifies flares
README.md - Curve loading → Causal rolling windows: constructs windows
README.md - Causal rolling windows → 42 variability features: extracts features
README.md - Bayesian-Blocks flares → WATCH/TRIGGER labels: assigns forecasts
README.md - Causal rolling windows → WATCH/TRIGGER labels: assigns forecasts
README.md - 42 variability features → Training dataset: builds rows
README.md - WATCH/TRIGGER labels → Training dataset: builds labels
README.md - Training dataset → TRAIN preprocessing: preprocesses TRAIN
README.md - TRAIN preprocessing → Logistic Regression: trains
README.md - TRAIN preprocessing → Polynomial Logistic Regression: trains
README.md - TRAIN preprocessing → Random Forest: trains
README.md - TRAIN preprocessing → Exploratory XGBoost: trains
README.md - Logistic Regression → Calibration and thresholds: calibrates scores
README.md - Polynomial Logistic Regression → Calibration and thresholds: calibrates scores
README.md - Random Forest → Calibration and thresholds: calibrates scores
README.md - Exploratory XGBoost → Calibration and thresholds: calibrates scores
README.md - Calibration and thresholds → Held-out evaluation: evaluates TEST
README.md - Held-out evaluation → Statistical tests: tests significance
README.md - Held-out evaluation → Dual-threshold alerts: supports alert states
README.md - Held-out evaluation → Figures and tables: generates diagnostics
README.md - Statistical tests → Figures and tables: reports results
README.md - Figures and tables → Analysis output directory: writes outputs
README.md - Researcher → Analysis output directory: runs analysis
README.md