Prediction of Space Weather Events through Analysis of Active Region Magnetograms using Convolutional Neural Network