Data for: Forecasting Solar Flares using magnetogram-based predictors and Machine Learning

Published: 10 December 2017| Version 1 | DOI: 10.17632/4f6z2gf5d6.1
Kostas Florios


Replication Files for the paper "Forecasting Solar Flares using magnetogram-based predictors and Machine Learning". The source code is in R and the data files are simple text files. Abstract of the associated paper: We propose a forecasting approach for solar flares based on data from Solar Cycle 24, taken by the Helioseismic and Magnetic Imager (HMI) on board the Solar Dynamics Observatory (SDO) mission. In particular, we use the Space-weather HMI Active Region Patches (SHARP) product that facilitates cut-out magnetograms of solar active regions (AR) in the Sun in near-realtime (NRT), taken over a five-year interval (2012 - 2016). Our approach utilizes a set of thirteen predictors, which are not included in the SHARP data, extracted from line-of-sight and vector photospheric magnetograms. We exploit several Machine Learning (ML) and Conventional Statistics techniques to predict flares of class >M1 and >C1, with a 24h forecast window. The ML methods used are Multi-Layer Perceptrons (MLP), Support Vector Machines (SVM) and Random Forests (RF). We conclude that Random Forests could be the prediction technique of choice for our sample, with the second best method being Multi-Layer Perceptrons, subject to an entropy objective function. A Monte Carlo simulation showed that the best performing method gives accuracy ACC=0.93(0.00), true skill statistic TSS=0.74(0.02) and Heidke skill score HSS=0.49(0.01) for a >M1 class flares prediction with probability threshold 15% and ACC=0.84(0.00), TSS=0.60(0.01) and HSS=0.59(0.01) for a >C1 class flares prediction with probability threshold 35%.


Steps to reproduce

Please read the file "" in order to reproduce the results in the paper with the source code and data provided in the zip file. Basic knowledge of R is needed in order to replicate the main text Tables and Figures of the corresponding paper. The paper is available at the Optimization Online repository at the URL:


Academy of Athens


Machine Learning, Forecasting, Solar Flare