Skip to content

ZeyuSun/flare-prediction-smarp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dc58e57 · Feb 23, 2024
Mar 22, 2022
Jun 19, 2023
Mar 22, 2022
Jun 19, 2023
Apr 5, 2022
Feb 23, 2024
Jan 15, 2022
May 30, 2021
May 16, 2021
Oct 17, 2021
Mar 22, 2022
Jan 15, 2022
Jan 21, 2022
Jun 19, 2023
May 19, 2021
May 21, 2021
Oct 17, 2021

Repository files navigation

Predicting Solar Flares Using CNN and LSTM on Two Solar Cycles of Active Region Data

DOI

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)

Quick start

  1. Download data: Change the email and data directory in download.py and run python download.py.
  2. Preprocess data
  3. Change the data directory in preprocess.py.
  4. Install Redis. (Alternatively, change the default value of redis to False in function query in data.py)
  5. Run python preprocess.py.
  6. Exploratory data analysis (eda.py)
  7. Fit and evaluate machine learning methods:
  8. Scikit-learn models
  9. Pytorch-lightning models 1. MLP 2. LSTM 3. 2D CNN 4. 3D CNN
  10. Present results (notebooks/mlflow_results.ipynb)

Citation

@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}
}

About

Flare prediction with SMARP and SHARP

Resources

License

Stars

Watchers

Forks

Packages

No packages published