Solar Physics

, 293:28 | Cite as

Forecasting Solar Flares Using Magnetogram-based Predictors and Machine Learning

  • Kostas FloriosEmail author
  • Ioannis Kontogiannis
  • Sung-Hong Park
  • Jordan A. Guerra
  • Federico Benvenuto
  • D. Shaun Bloomfield
  • Manolis K. Georgoulis


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 metadata, extracted from line-of-sight and vector photospheric magnetograms. We exploit several machine learning (ML) and conventional statistics techniques to predict flares of peak magnitude \({>}\,\mbox{M1}\) and \({>}\,\mbox{C1}\) within a 24 h 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 \(\mathrm{ACC}=0.93(0.00)\), true skill statistic \(\mathrm{TSS}=0.74(0.02)\), and Heidke skill score \(\mathrm{HSS}=0.49(0.01)\) for \({>}\,\mbox{M1}\) flare prediction with probability threshold 15% and \(\mathrm{ACC}=0.84(0.00)\), \(\mathrm{TSS}=0.60(0.01)\), and \(\mathrm{HSS}=0.59(0.01)\) for \({>}\,\mbox{C1}\) flare prediction with probability threshold 35%.


Flares, forecasting Flares, relation to magnetic field Active regions, magnetic fields 



We would like to thank the anonymous referee for very helpful comments that greatly improved the initial manuscript. This research has been supported by the EU Horizon 2020 Research and Innovation Action under grant agreement No.640216 for the “Flare Likelihood And Region Eruption foreCASTing” (FLARECAST) project. Data were provided by the MEDOC data and operations centre (CNES/CNRS/Univ. Paris-Sud), and the GOES team.

Disclosure of Potential Conflicts of Interest

The authors declare that they have no conflicts of interest.


  1. Ahmed, O., Qahwaji, R., Colak, T., Dudok De Wit, T., Ipson, S.: 2010, A new technique for the calculation and 3D visualisation of magnetic complexities on solar satellite images. Vis. Comput. 26, 385. DOI. CrossRefGoogle Scholar
  2. Ahmed, O.W., Qahwaji, R., Colak, T., Higgins, P.A., Gallagher, P.T., Bloomfield, D.S.: 2013, Solar flare prediction using advanced feature extraction, machine learning, and feature selection. Solar Phys. 283(1), 157. DOI. ADSCrossRefGoogle Scholar
  3. Al-Ghraibah, A., Boucheron, L.E., McAteer, R.T.J.: 2015, An automated classification approach to ranking photospheric proxies of magnetic energy build-up. Astron. Astrophys. 579, A64. DOI. ADSCrossRefGoogle Scholar
  4. Alissandrakis, C.E.: 1981, On the computation of constant alpha force-free magnetic field. Astron. Astrophys. 100, 197. ADSGoogle Scholar
  5. Barnes, G., Longcope, D.W., Leka, K.D.: 2005, Implementing a magnetic charge topology model for solar active regions. Astrophys. J. 629, 561. DOI. ADSCrossRefGoogle Scholar
  6. Barnes, G., Schanche, N., Leka, K., Aggarwal, A., Reeves, K.: 2016, A comparison of classifiers for solar energetic events. Proc. Int. Astron. Union 12(S325), 201. DOI. CrossRefGoogle Scholar
  7. Bloomfield, D.S., Higgins, P.A., McAteer, R.T.J., Gallagher, P.T.: 2012, Toward reliable benchmarking of solar flare forecasting methods. Astrophys. J. Lett. 747(2). DOI.
  8. Bobra, M.G., Couvidat, S.: 2015, Solar flare prediction using SDO/HMI vector magnetic field data with a machine-learning algorithm. Astrophys. J. 798(2), 135. DOI. ADSCrossRefGoogle Scholar
  9. Bobra, M.G., Sun, X., Hoeksema, J.T., Turmon, M., Liu, Y., Hayashi, K., Barnes, G., Leka, K.D.: 2014, The Helioseismic and Magnetic Imager (HMI) vector magnetic field pipeline: SHARPs – Space-weather HMI active region patches. Solar Phys. 289(9), 3549. DOI. ADSCrossRefGoogle Scholar
  10. Boucheron, L.E., Al-Ghraibah, A., McAteer, R.T.J.: 2015, Prediction of solar flare size and time-to-flare using support vector machine regression. Astrophys. J. 812(1), 51. DOI. ADSCrossRefGoogle Scholar
  11. Breiman, L.: 2001, Random forests. Mach. Learn. 45(1), 5. DOI. CrossRefzbMATHGoogle Scholar
  12. Breiman, L., Friedman, J., Stone, C.J., Olshen, R.A.: 1984, Classification and Regression Trees. zbMATHGoogle Scholar
  13. Brier, G.W.: 1950, Verification of forecasts expressed in terms of probability. Mon. Weather Rev. 78, 1. DOI. ADSCrossRefGoogle Scholar
  14. Chang, Y.-W., Lin, C.-J.: 2008, Feature ranking using linear svm. In: Guyon, I., Aliferis, C., Cooper, G., Elisseeff, A., Pellet, J.-P., Spirtes, P., Statnikov, A. (eds.) Proceedings of the Workshop on the Causation and Prediction Challenge at WCCI 2008, Proceedings of Machine Learning Research 3, 53. Google Scholar
  15. Chang, C.-C., Lin, C.-J.: 2011, LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol. 2, 27:1. Software available at DOI. CrossRefGoogle Scholar
  16. Chen, Y.-W., Lin, C.-J.: 2006, Combining SVMs with various feature selection strategies. In: Feature Extraction, Springer, Berlin, 315. DOI. CrossRefGoogle Scholar
  17. Colak, T., Qahwaji, R.: 2009, Automated solar activity prediction: A hybrid computer platform using machine learning and solar imaging for automated prediction of solar flares. Space Weather 7(6), S06001. DOI. ADSCrossRefGoogle Scholar
  18. de Souza, R.S., Cameron, E., Killedar, M., Hilbe, J., Vilalta, R., Maio, U., Biffi, V., Ciardi, B., Riggs, J.D.: 2015, The overlooked potential of generalized linear models in astronomy, I: binomial regression. Astron. Comput. 12, 21. DOI. ADSCrossRefGoogle Scholar
  19. Falconer, D.A., Moore, R.L., Gary, G.A.: 2008, Magnetogram measures of total nonpotentiality for prediction of solar coronal mass ejections from active regions of any degree of magnetic complexity. Astrophys. J. 689, 1433. DOI. ADSCrossRefGoogle Scholar
  20. Falconer, D., Barghouty, A.F., Khazanov, I., Moore, R.: 2011, A tool for empirical forecasting of major flares, coronal mass ejections, and solar particle events from a proxy of active-region free magnetic energy. Space Weather 9(4), n/a. S04003. DOI. ADSCrossRefGoogle Scholar
  21. Falconer, D.A., Moore, R.L., Barghouty, A.F., Khazanov, I.: 2012, Prior flaring as a complement to free magnetic energy for forecasting solar eruptions. Astrophys. J. 757, 32. DOI. ADSCrossRefGoogle Scholar
  22. Falconer, D.A., Moore, R.L., Barghouty, A.F., Khazanov, I.: 2014, MAG4 versus alternative techniques for forecasting active region flare productivity. Space Weather 12(5), 306. DOI. ADSCrossRefGoogle Scholar
  23. Fang, F., Manchester, W. IV, Abbett, W.P., van der Holst, B.: 2012, Buildup of magnetic shear and free energy during flux emergence and cancellation. Astrophys. J. 754, 15. DOI. ADSCrossRefGoogle Scholar
  24. Fernández-Delgado, M., Cernadas, E., Barro, S., Amorim, D.: 2014, Do we need hundreds of classifiers to solve real world classification problems? J. Mach. Learn. Res. 15, 3133. MathSciNetzbMATHGoogle Scholar
  25. Fletcher, L., Dennis, B.R., Hudson, H.S., Krucker, S., Phillips, K., Veronig, A., Battaglia, M., Bone, L., Caspi, A., Chen, Q., Gallagher, P., Grigis, P.T., Ji, H., Liu, W., Milligan, R.O., Temmer, M.: 2011, An observational overview of solar flares. Space Sci. Rev. 159, 19. DOI. ADSCrossRefGoogle Scholar
  26. Georgoulis, M.K., Rust, D.M.: 2007, Quantitative forecasting of major solar flares. Astrophys. J. Lett. 661, L109. DOI. ADSCrossRefGoogle Scholar
  27. Granett, B.R.: 2017, Probing the sparse tails of redshift distributions with Voronoi tessellations. Astron. Comput. 18, 18. DOI. ADSCrossRefGoogle Scholar
  28. Greco, S., Figueira, J., Ehrgott, M.: 2016, Multiple Criteria Decision Analysis, 2nd edn. CrossRefzbMATHGoogle Scholar
  29. Greene, W.H.: 2002, Econometric Analysis, 5th edn. Google Scholar
  30. Guerra, J.A., Pulkkinen, A., Uritsky, V.M., Yashiro, S.: 2015, Spatio-temporal scaling of turbulent photospheric line-of-sight magnetic field in active region NOAA 11158. Solar Phys. 290, 335. DOI. ADSCrossRefGoogle Scholar
  31. Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: 2009, The WEKA data mining software: An update. ACM SIGKDD Explor. Newsl. 11(1), 10. DOI. CrossRefGoogle Scholar
  32. Hanssen, A., Kuipers, W.: 1965, On the Relationship Between the Frequency of Rain and Various Meteorological Parameters: (with Reference to the Problem of Objective Forecasting). Google Scholar
  33. Hastie, T., Tibshirani, R., Friedman, J.: 2009, The Elements of Statistical Learning: Data Mining, Inference and Prediction, 2nd edn. CrossRefzbMATHGoogle Scholar
  34. Heidke, P.: 1926, Berechnung des erfolges und der güte der windstärkevorhersagen im sturmwarnungsdienst. Geogr. Ann. 8, 301. DOI. zbMATHGoogle Scholar
  35. Hornik, K., Stinchcombe, M., White, H.: 1989, Multilayer feedforward networks are universal approximators. Neural Netw. 2(5), 359. DOI. CrossRefGoogle Scholar
  36. Kliem, B., Török, T.: 2006, Torus instability. Phys. Rev. Lett. 96(25), 255002. DOI. ADSCrossRefGoogle Scholar
  37. Laboratory, N.-R.A.: 2015, Verification: Weather forecast verification utilities. R package version 1.42. Google Scholar
  38. Li, R., Cui, Y., He, H., Wang, H.: 2008, Application of support vector machine combined with k-nearest neighbors in solar flare and solar proton events forecasting. Adv. Space Res. 42(9), 1469. DOI. ADSCrossRefGoogle Scholar
  39. Liaw, A., Wiener, M.: 2002, Classification and regression by randomforest. R News 2(3), 18. Google Scholar
  40. Liu, C., Deng, N., Wang, J.T.L., Wang, H.: 2017, Predicting solar flares using SDO/HMI vector magnetic data products and the random forest algorithm. Astrophys. J. 843(2), 104. DOI. ADSCrossRefGoogle Scholar
  41. MacKay, D.J.C.: 2003, Information Theory, Inference, and Learning Algorithms. zbMATHGoogle Scholar
  42. Marzban, C.: 2004, The ROC curve and the area under it as performance measures. Weather Forecast. 19(6), 1106. DOI. ADSCrossRefGoogle Scholar
  43. Meyer, D., Leisch, F., Hornik, K.: 2003, The support vector machine under test. Neurocomputing 55(1), 169. DOI. CrossRefGoogle Scholar
  44. Meyer, D., Dimitriadou, E., Hornik, K., Weingessel, A., Leisch, F.: 2015, e1071: Misc functions of the department of statistics, probability theory group (formerly: E1071), TU Wien. R package version 1.6-7. Google Scholar
  45. Pesnell, W.D., Thompson, B.J., Chamberlin, P.C.: 2012, The Solar Dynamics Observatory (SDO). Solar Phys. 275, 3. DOI. ADSCrossRefGoogle Scholar
  46. Prieto, A., Prieto, B., Ortigosa, E.M., Ros, E., Pelayo, F., Ortega, J., Rojas, I.: 2016, Neural networks: An overview of early research, current frameworks and new challenges. Neurocomputing 214, 242. DOI. CrossRefGoogle Scholar
  47. R Core Team: 2016, R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna. Google Scholar
  48. Scherrer, P.H., Bogart, R.S., Bush, R.I., Hoeksema, J.T., Kosovichev, A.G., Schou, J., et al.: 1995, The solar oscillations investigation – Michelson Doppler imager. Solar Phys. 162, 129. DOI. ADSCrossRefGoogle Scholar
  49. Scherrer, P.H., Schou, J., Bush, R.I., Kosovichev, A.G., Bogart, R.S., Hoeksema, J.T., Liu, Y., Duvall, T.L., Zhao, J., Title, A.M., Schrijver, C.J., Tarbell, T.D., Tomczyk, S.: 2012, The Helioseismic and Magnetic Imager (HMI) investigation for the Solar Dynamics Observatory (SDO). Solar Phys. 275, 207. DOI. ADSCrossRefGoogle Scholar
  50. Schrijver, C.J.: 2007, A characteristic magnetic field pattern associated with all major solar flares and its use in flare forecasting. Astrophys. J. Lett. 655, L117. DOI. ADSCrossRefGoogle Scholar
  51. Schuh, M.A., Angryk, R.A., Martens, P.C.: 2015, Solar image parameter data from the SDO: Long-term curation and data mining. Astron. Comput. 13, 86. DOI. ADSCrossRefGoogle Scholar
  52. Sing, T., Sander, O., Beerenwinkel, N., Lengauer, T.: 2005, ROCR: Visualizing classifier performance in R. Bioinformatics 21(20), 7881. DOI. CrossRefGoogle Scholar
  53. Song, H., Tan, C., Jing, J., Wang, H., Yurchyshyn, V., Abramenko, V.: 2009, Statistical assessment of photospheric magnetic features in imminent solar flare predictions. Solar Phys. 254(1), 101. DOI. ADSCrossRefGoogle Scholar
  54. Vapnik, V.: 1998, Statistical Learning Theory. zbMATHGoogle Scholar
  55. Venables, W.N., Ripley, B.D.: 2002, Modern Applied Statistics with S, 4th edn. Springer, New York. DOI. CrossRefzbMATHGoogle Scholar
  56. Vilalta, R., Gupta, K.D., Macri, L.: 2013, A machine learning approach to Cepheid variable star classification using data alignment and maximum likelihood. Astron. Comput. 2, 46. DOI. ADSCrossRefGoogle Scholar
  57. Wang, H.N., Cui, Y.M., Li, R., Zhang, L.Y., Han, H.: 2008, Solar flare forecasting model supported with artificial neural network techniques. Adv. Space Res. 42(9), 1464. DOI. ADSCrossRefGoogle Scholar
  58. Wilks, D.S.: 2011, Statistical Methods in the Atmospheric Sciences 100. Google Scholar
  59. Winkelmann, R., Boes, S.: 2006, Analysis of Microdata, Springer, Berlin. zbMATHGoogle Scholar
  60. Witten, I.H., Frank, E., Hall, M.A., Pal, C.J.: 2016, Data Mining: Practical Machine Learning Tools and Techniques. Google Scholar
  61. Yu, D., Huang, X., Wang, H., Cui, Y.: 2009, Short-term solar flare prediction using a sequential supervised learning method. Solar Phys. 255(1), 91. DOI. ADSCrossRefGoogle Scholar
  62. Yuan, Y., Shih, F.Y., Jing, J., Wang, H.-M.: 2010, Automated flare forecasting using a statistical learning technique. Res. Astron. Astrophys. 10(8), 785. DOI. ADSCrossRefGoogle Scholar
  63. Zuccarello, F.P., Aulanier, G., Gilchrist, S.A.: 2015, Critical decay index at the onset of solar eruptions. Astrophys. J. 814, 126. DOI. ADSCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media B.V., part of Springer Nature 2018

Authors and Affiliations

  1. 1.Research Center for Astronomy and Applied MathematicsAcademy of AthensAthensGreece
  2. 2.Department of StatisticsAthens University of Economics and BusinessAthensGreece
  3. 3.School of PhysicsTrinity College DublinDublinIreland
  4. 4.Dipartimento di MatematicaUniversità di GenovaGenoaItaly
  5. 5.Northumbria UniversityNewcastle upon TyneUK

Personalised recommendations