Abstract
Solar flares are one of the most important sources of disastrous space weather events, leading to negative effects on spacecrafts and living organisms. It is very important to predict solar flares to minimize the potential losses. In this paper, we use three different machine learning algorithms: K-Nearest Neighbors (KNN), Random Forest (RF), and XGBoost (XGB) to predict the total flare index \(\text{T}_{\mathrm{flare}}\) and the maximum flare index \(\text{M}_{\mathrm{flare}}\) of an active region (AR) within the subsequent of 24, 48, and 72 hrs. First, we selected 54514 vector magnetograms of 129 ARs on the visible solar hemisphere in solar cycle 24 whose maximum sunspot groups’ area was larger than 400 μh. Then the following four magnetic parameters of each magnetogram were calculated: 1) the total magnetic flux \(|\Phi _{\mathrm{tot}}|\), 2) the total photospheric free magnetic energy density \(\text{E}_{\mathrm{free}}\), 3) the gradient-weighted integral length of the neutral line with horizontal magnetic gradient of line-of-sight magnetic field larger than \(0.1~\text{G}\,\text{km}^{\mathrm{-1}}\) (\(\text{WL}_{\mathrm{SG}}\)), and 4) the area with magnetic shear angle larger than \(40^{\circ }\) (\(\text{A}_{\Psi }\)), as well as \(\text{T}_{\mathrm{flare}}\) and \(\text{M}_{\mathrm{flare}}\) corresponding to each magnetogram. Afterward, we split samples randomly into training (85% of the whole data) and testing (15%) data sets. After hyperparameter tuning and model construction we found that RF is an optimal algorithm for the prediction task and that the coefficients of determination (\(\text{R}^{\mathrm{2}}\)) of test data set via the majority of RF models are beyond 0.97. In addition, the feature importance of RF and XGB models indicates that \(|\Phi_{\mathrm{tot}}|\) and \(\text{E}_{\mathrm{free}}\) are two optimal parameters to predict both \(\text{T}_{\mathrm{flare}}\) and \(\text{M}_{\mathrm{flare}}\), and \(|\Phi _{\mathrm{tot}}|\) and \(\text{E}_{\mathrm{free}}\) are the best parameters for \(\text{M}_{\mathrm{flare}}\) and \(\text{T}_{\mathrm{flare}}\), respectively.
Similar content being viewed by others
References
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. ADS.
Baker, D.N., McPherron, R.L., Cayton, T.E., Klebesadel, R.W.: 1990, Linear prediction filter analysis of relativistic electron properties at \(6.6~\text{R}_{E}\). J. Geophys. Res. 95(A9), 15133. DOI. ADS.
Benvenuto, F., Piana, M., Campi, C., Massone, A.M.: 2018, A hybrid supervised/unsupervised machine learning approach to solar flare prediction. Astrophys. J. 853(1), 90. DOI. ADS.
Bhattacharjee, S., Alshehhi, R., Dhuri, D.B., Hanasoge, S.M.: 2020, Supervised convolutional neural networks for classification of flaring and nonflaring active regions using line-of-sight magnetograms. Astrophys. J. 898, 98. DOI. ADS.
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. ADS.
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. ADS.
Breiman, L.: 2001, Random forests. Mach. Learn. 45(1), 5–32. DOI.
Camporeale, E.: 2019, The challenge of machine learning in space weather: nowcasting and forecasting. Space Weather 17(8), 1166. DOI.
Castellanos Durán, J.S., Kleint, L., Calvo-Mozo, B.: 2018, A statistical study of photospheric magnetic field changes during 75 solar flares. Astrophys. J. 852(1), 25. DOI. ADS.
Chen, T.: 2016, xgboost, GitHub.
Chen, T., Guestrin, C.: 2016, Xgboost. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 9781450342322. DOI.
Chen, A.Q., Wang, J.X.: 2012, Quantifying solar superactive regions with vector magnetic field observations. Astron. Astrophys. 543, A49. DOI. ADS.
Chen, A., Wang, J.: 2016, Super-active regions in solar cycle 24. In: Kosovichev, A.G., Hawley, S.L., Heinzel, P. (eds.) Solar and Stellar Flares and Their Effects on Planets 320, 309. DOI. ADS.
Chen, A., Wang, J.: 2020, On the possibility of predicting flare index and CME velocity using vector magnetograms. Sci. China 63(6), 265912. DOI. ADS.
Chen, Y., Manchester, W.B., Hero, A.O., Toth, G., DuFumier, B., Zhou, T., Wang, X., Zhu, H., Sun, Z., Gombosi, T.I.: 2019, Identifying solar flare precursors using time series of SDO/HMI images and SHARP parameters. Space Weather 17, 1404. DOI. ADS.
Choudhary, D.P., Ambastha, A., Ai, G.: 1998, Emerging flux and X-class flares in NOAA 6555. Solar Phys. 179(1), 133. DOI. ADS.
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. ADS.
Cover, T., Hart, P.: 1967, Nearest neighbor pattern classification. IEEE Trans. Inf. Theory 13(1), 21. DOI.
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(2), 1433. DOI. ADS.
Falconer, D.A., Moore, R.L., Gary, G.A., Adams, M.: 2009, The “main sequence” of explosive solar active regions: discovery and interpretation. Astrophys. J. 700(2), L166. DOI. ADS.
Florios, K., Kontogiannis, I., Park, S.-H., Guerra, J.A., Benvenuto, F., Bloomfield, D.S., Georgoulis, M.K.: 2018, Forecasting solar flares using magnetogram-based predictors and machine learning. Solar Phys. 293(2), 28. DOI. ADS.
Fontenla, J.M., Ambastha, A., Kalman, B., Csepura, G.: 1995, The magnetic evolution of AR 6555 which LED to two impulsive, relatively compact, X-type flares. Astrophys. J. 440, 894. DOI. ADS.
Georgoulis, M.K.: 2008, Magnetic complexity in eruptive solar active regions and associated eruption parameters. Geophys. Res. Lett. 35(6), L06S02. DOI. ADS.
Goodfellow, I., Bengio, Y., Courville, A.: 2016, Deep Learning, MIT Press, Cambridge.
Hagyard, M.J., Smith, J., Teuber, D., West, E.A.: 1984, A quantitative study relating observed shear in photospheric magnetic fields to repeated flaring. Solar Phys. 91(1), 115. DOI. ADS.
Huang, X., Wang, H., Xu, L., Liu, J., Li, R., Dai, X.: 2018, Deep learning based solar flare forecasting model. I. Results for line-of-sight magnetograms. Astrophys. J. 856(1), 7. DOI. ADS.
Ishii, T.T., Kurokawa, H., Takeuchi, T.T.: 1998, Emergence of a twisted magnetic flux bundle as a source of strong flare activity. Astrophys. J. 499(2), 898. DOI. ADS.
Ji, E.-Y., Moon, Y.-J., Park, J., Lee, J.-Y., Lee, D.-H.: 2013, Comparison of neural network and support vector machine methods for Kp forecasting. J. Geophys. Res. 118(8), 5109. DOI. ADS.
Jiao, Z., Sun, H., Wang, X., Manchester, W., Gombosi, T., Hero, A., Chen, Y.: 2020, Solar flare intensity prediction with machine learning models. Space Weather 18, e2020SW002440. DOI. ADS.
Leka, K.D., Barnes, G.: 2003, Photospheric magnetic field properties of flaring versus flare-quiet active regions. II. Discriminant analysis. Astrophys. J. 595(2), 1296. DOI. ADS.
Leka, K.D., Barnes, G.: 2007, Photospheric magnetic field properties of flaring versus flare-quiet active regions. IV. A statistically significant sample. Astrophys. J. 656(2), 1173. DOI. ADS.
Li, R., Zhu, J.: 2013, Solar flare forecasting based on sequential sunspot data. Res. Astron. Astrophys. 13(9), 1118. DOI. ADS.
Li, H., Sakurai, T., Ichimoto, K., UeNo, S.: 2000, Magnetic field evolution leading to solar flares I. Cases with low magnetic shear and flux emergence. Astron. Soc. Japan 52, 465. DOI. ADS.
Li, R., Wang, H.-N., He, H., Cui, Y.-M., Du, Z.-L.: 2007, Support vector machine combined with K-nearest neighbors for solar flare forecasting. Chin. J. Astron. Astrophys. 7(3), 441. DOI. ADS.
Li, X., Zheng, Y., Wang, X., Wang, L.: 2020, Predicting solar flares using a novel deep convolutional neural network. Astrophys. J. 891, 10. DOI. ADS.
Liu, Y., Hoeksema, J.T., Scherrer, P.H., Schou, J., Couvidat, S., Bush, R.I., Duvall, T.L., Hayashi, K., Sun, X., Zhao, X.: 2012, Comparison of line-of-sight magnetograms taken by the Solar Dynamics Observatory/Helioseismic and Magnetic Imager and Solar and Heliospheric Observatory/Michelson Doppler Imager. Solar Phys. 279(1), 295. DOI. ADS.
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. ADS.
Liu, H., Liu, C., Wang, J.T.L., Wang, H.: 2019, Predicting solar flares using a long short-term memory network. Astrophys. J. 877, 121. DOI. ADS.
Lü, Y., Wang, J., Wang, H.: 1993, Shear angle of magnetic fields. Solar Phys. 148(1), 119. DOI. ADS.
Mason, J.P., Hoeksema, J.T.: 2010, Testing automated solar flare forecasting with 13 years of Michelson Doppler Imager magnetograms. Astrophys. J. 723(1), 634. DOI. ADS.
Nagem, T.A.M.H., Qahwaji, R., Ipson, S., Wang, Z., Al-Waisy, A.S.: 2018, Deep learning technology for predicting solar flares from (geostationary operational environmental satellite) data. Int. J. Adv. Comput. Sci. Appl. 9(1), 492. DOI.
Nishizuka, N., Sugiura, K., Kubo, Y., Den, M., Watari, S., Ishii, M.: 2017, Solar flare prediction model with three machine-learning algorithms using ultraviolet brightening and vector magnetograms. Astrophys. J. 835(2), 156. DOI. ADS.
Nishizuka, N., Sugiura, K., Kubo, Y., Den, M., Ishii, M.: 2018a, Deep Flare Net (DeFN) model for solar flare prediction. Astrophys. J. 858(2), 113. DOI. ADS.
Nishizuka, N., Sugiura, K., Kubo, Y., Den, M., Ishii, M.: 2018b, Deep Flare Net (DeFN) model for solar flare prediction. Astrophys. J. 858(2), 113. DOI. ADS.
Nitta, N., van Driel-Gesztelyi, L., Leka, K.D., Shibata, K.: 1996, Emerging flux and flares in NOAA 7260. Adv. Space Res. 17(4–5), 201. DOI. ADS.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, E.: 2011, Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825.
Qahwaji, R., Colak, T.: 2007, Automatic short-term solar flare prediction using machine learning and sunspot associations. Solar Phys. 241(1), 195. DOI. ADS.
Romano, P., Zuccarello, F.: 2007, Photospheric magnetic evolution of super active regions. Astron. Astrophys. 474(2), 633. DOI. ADS.
Schou, J., Scherrer, P.H., Bush, R.I., Wachter, R., Couvidat, S., Rabello-Soares, M.C., Bogart, R.S., Hoeksema, J.T., Liu, Y., Duvall, T.L., Akin, D.J., Allard, B.A., Miles, J.W., Rairden, R., Shine, R.A., Tarbell, T.D., Title, A.M., Wolfson, C.J., Elmore, D.F., Norton, A.A., Tomczyk, S.: 2012, Design and ground calibration of the Helioseismic and Magnetic Imager (HMI) instrument on the Solar Dynamics Observatory (SDO). Solar Phys. 275(1-2), 229. DOI. ADS.
Schrijver, C.J.: 2007, A characteristic magnetic field pattern associated with all major solar flares and its use in flare forecasting. Astrophys. J. 655(2), L117. DOI. ADS.
Shi, Z., Wang, J.: 1994, Delta-sunspots and X-class flares. Solar Phys. 149(1), 105. DOI. ADS.
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. ADS.
Tian, L., Liu, Y., Wang, J.: 2002, The most violent super-active regions in the 22nd and 23rd cycles. Solar Phys. 209(2), 361. DOI. ADS.
Toriumi, S., Schrijver, C.J., Harra, L.K., Hudson, H., Nagashima, K.: 2017, Magnetic properties of solar active regions that govern large solar flares and eruptions. Astrophys. J. 834(1), 56. DOI. ADS.
Vasantharaju, N., Vemareddy, P., Ravindra, B., Doddamani, V.H.: 2018, Statistical study of magnetic nonpotential measures in confined and eruptive flares. Astrophys. J. 860(1), 58. DOI. ADS.
Wang, J.: 1999, Vector magnetic fields and magnetic activity on the Sun. Fundam. Cosm. Phys. 20(3), 251. ADS.
Wang, S., Liu, C., Wang, H.: 2012, The relationship between the sudden change of the Lorentz force and the magnitude of associated flares. Astrophys. J. 757(1), L5. DOI. ADS.
Wang, J., Shi, Z.: 1993, The flare-associated magnetic changes in an active region – part two. Solar Phys. 143(1), 119. DOI. ADS.
Wang, Y., Zhang, J.: 2008, A statistical study of solar active regions that produce extremely fast coronal mass ejections. Astrophys. J. 680(2), 1516. DOI. ADS.
Wang, J., Shi, Z., Wang, H., Lü, Y.: 1996, Flares and the magnetic nonpotentiality. Astrophys. J. 456, 861. DOI. ADS.
Wang, H., Spirock, T.J., Qiu, J., Ji, H., Yurchyshyn, V., Moon, Y.-J., Denker, C., Goode, P.R.: 2002, Rapid changes of magnetic fields associated with six X-class flares. Astrophys. J. 576(1), 497. DOI. ADS.
Wang, H.-M., Song, H., Jing, J., Yurchyshyn, V., Deng, Y.-Y., Zhang, H.-Q., Falconer, D., Li, J.: 2006, The relationship between magnetic gradient and magnetic shear in five super active regions producing great flares. Chin. J. Astron. Astrophys. 6(4), 477. DOI. ADS.
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. ADS.
Wang, S., Liu, C., Liu, R., Deng, N., Liu, Y., Wang, H.: 2012, Response of the photospheric magnetic field to the X2.2 flare on 2011 February 15. Astrophys. J. 745(2), L17. DOI. ADS.
Wang, J., Liu, S., Ao, X., Zhang, Y., Wang, T., Liu, Y.: 2019, Parameters derived from the SDO/HMI vector magnetic field data: potential to improve machine-learning-based solar flare prediction models. Astrophys. J. 884(2), 175. DOI. ADS.
Wang, X., Chen, Y., Toth, G., Manchester, W.B., Gombosi, T.I., Hero, A.O., Jiao, Z.: 2020, Predicting solar flares with machine learning: investigating solar cycle dependence. Astrophys. J. 895, 3. DOI. ADS.
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. ADS.
Zhang, H., Ai, G., Yan, X., Li, W., Liu, Y.: 1994, Evolution of vector magnetic field and white-light flares in a solar active region (NOAA 6659) in 1991 June. Astrophys. J. 423, 828. DOI. ADS.
Zheng, Y., Li, X., Wang, X.: 2019, Solar flare prediction with the hybrid deep convolutional neural network. Astrophys. J. 885(1), 73. DOI. ADS.
Zirin, H., Tanaka, K.: 1973, The flares of August 1972. Solar Phys. 32(1), 173. DOI. ADS.
Acknowledgements
We thank the SDO/HMI science team for the processed vector magnetograms and Space Weather Prediction Center for solar region summary, as well as solar and geophysical activity summary. The research is supported by the Strategic Priority Program on Space Science, Chinese Academy of Sciences, Grant No. XDA15350203, and Key Research Program of Frontier Sciences CAS, Grant No. ZDBS-LY-SLH013.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Disclosure of Potential Conflicts of Interest
The authors declare that there is no conflict of interest.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Chen, A., Ye, Q. & Wang, J. Flare Index Prediction with Machine Learning Algorithms. Sol Phys 296, 150 (2021). https://doi.org/10.1007/s11207-021-01895-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11207-021-01895-1