This study uses a convolutional neural network (CNN) to classify waveforms into distinct categories of events, such as earthquakes and blasts (including quarry and mining explosions), using spectrograms, with a specific application in Madagascar. This approach consists of three key steps: (1) generating spectrograms from ground‐motion recordings to represent time–frequency information; (2) training, validating, and testing the model using the generated spectrograms; and (3) making predictions. The performance of the CNN model is evaluated using a commonly used loss function and accuracy measures. This study utilizes data from seven short‐period permanent stations located in the central part of Madagascar. Initially, we use part of the data for training, validation, and testing, focusing on 2492 known events. The results indicate that despite a limited training dataset and a few stations, the testing process achieves an average model accuracy of 0.98. The mean precision for each class is 0.91 for quarries and 0.99 for earthquakes, with mean recall values of 0.94 for quarries and 0.99 for earthquakes. The F1‐scores are 0.92 for quarry blasts and 0.99 for earthquakes. The derived CNN model is subsequently adopted to predict the remaining uncategorized events, with predictions made on a station‐by‐station basis to ensure better results. The results demonstrate that the model successfully identifies mining sites, even those that were not included in the training dataset. Therefore, the model has effectively learned the distinguishing features of different event classes, even when presented with data from various parts of Madagascar. This work underscores the importance of machine learning techniques in seismology and highlights the potential of CNNs to improve seismic event discrimination. The performance of the present study is further assessed by comparing our results with existing CNN methods utilizing key metrics such as accuracy, precision, recall, and F1‐score.

You do not have access to this content, please speak to your institutional administrator if you feel you should have access.