This repository contains codes for data processing, model training, and performance evaluation used in paper Predicting Solar Flares Using CNN and LSTM on Two Solar Cycles of Active Region Data (Sun et al. 2022)
- Download data: Change the email and data directory in
download.py
and runpython download.py
. - Preprocess data
- Change the data directory in
preprocess.py
. - Install Redis. (Alternatively, change the default value of
redis
to False in functionquery
indata.py
) - Run
python preprocess.py
. - Exploratory data analysis (
eda.py
) - Fit and evaluate machine learning methods:
- Scikit-learn models
- Pytorch-lightning models 1. MLP 2. LSTM 3. 2D CNN 4. 3D CNN
- Present results (notebooks/mlflow_results.ipynb)
@article{sun2022predicting,
title={Predicting solar flares using cnn and lstm on two solar cycles of active region data},
author={Sun, Zeyu and Bobra, Monica G and Wang, Xiantong and Wang, Yu and Sun, Hu and Gombosi, Tamas and Chen, Yang and Hero, Alfred},
journal={The Astrophysical Journal},
volume={931},
number={2},
pages={163},
year={2022},
publisher={IOP Publishing}
}