  Although space weather events may not directly affect human life, they have
the potential to inflict significant harm upon our communities. Harmful space
weather events can trigger atmospheric changes that result in physical and
economic damages on a global scale. In 1989, Earth experienced the effects of a
powerful geomagnetic storm that caused satellites to malfunction, while
triggering power blackouts in Canada, along with electricity disturbances in
the United States and Europe. With the solar cycle peak rapidly approaching,
there is an ever-increasing need to prepare and prevent the damages that can
occur, especially to modern-day technology, calling for the need of a
comprehensive prediction system. This study aims to leverage machine learning
techniques to predict instances of space weather (solar flares, coronal mass
ejections, geomagnetic storms), based on active region magnetograms of the Sun.
This was done through the use of the NASA DONKI service to determine when these
solar events occur, then using data from the NASA Solar Dynamics Observatory to
compile a dataset that includes magnetograms of active regions of the Sun 24
hours before the events. By inputting the magnetograms into a convolutional
neural network (CNN) trained from this dataset, it can serve to predict whether
a space weather event will occur, and what type of event it will be. The model
was designed using a custom architecture CNN, and returned an accuracy of
90.27%, a precision of 85.83%, a recall of 91.78%, and an average F1 score of
92.14% across each class (Solar flare [Flare], geomagnetic storm [GMS], coronal
mass ejection [CME]). Our results show that using magnetogram data as an input
for a CNN is a viable method to space weather prediction. Future work can
involve prediction of the magnitude of solar events.
