Vanneschi, LeonardoDeus, Rui Pedro GonçalvesFernandes, Luís Filipe Freire2024-10-312024-10-312024-10-28http://hdl.handle.net/10362/174389Dissertation presented as the partial requirement for obtaining a Master's degree in Data Science and Advanced Analytics, specialization in Data ScienceMaritime security is critical to global trade, transportation, and defence. It necessitates advanced methods for monitoring and detecting abnormal behaviours, especially "dark activity”, where vessels deactivate their Automatic Identification System (AIS) transponders to evade detection. This research aims to develop robust machine learning methodologies to identify anomalies within AIS data, focusing on detecting dark activity. The study leverages a comprehensive dataset comprising real AIS data from 2020, focusing on the Mediterranean Sea, provided by the Navy Information Analysis and Management Department (DAGI) and the National Maritime Authority (AMN). This dataset, consisting of over 330,000 entries, presents a significant challenge due to its highly imbalanced nature, with instances of dark activity constituting a mere fraction of the total data. Overcoming this imbalance was crucial to the success of the research. Advanced preprocessing techniques such as oversampling and synthetic sampling were essential to prevent the models from being biased towards the majority class and to ensure effective learning of minority class patterns. This study employs supervised and unsupervised machine learning methods to tackle different aspects of anomaly detection. Supervised models were primarily used to classify dark activity instances, while unsupervised models were implemented to detect general anomalies without using predefined labels. Evaluation metrics focused on F1-Score and recall for supervised and Silhouette Score for unsupervised methods. These models were deployed using FastAPI, enabling real-time classification and anomaly detection from new AIS data. By addressing the significant challenge posed by the highly imbalanced dataset and integrating advanced machine learning techniques, this study’s findings demonstrate the potential of machine learning in enhancing maritime surveillance, where advanced stacking methods were able to classify dark activity cases with an outstanding level of certainty, making a substantial contribution to naval security offering practical solutions for identifying and responding to dark activities, ultimately enhancing the safety and security of naval operationsengAutomatic Identification System (AIS)Anomaly DetectionDark ActivityImbalanced DataMachine LearningMaritime SecuritySupervised LearningUnsupervised LearningSDG 4 - Quality educationSDG 8 - Decent work and economic growthSDG 9 - Industry, innovation and infrastructureSDG 12 - Responsible production and consumptionSDG 13 - Climate actionSDG 14 - Life below waterSDG 16 - Peace, justice and strong institutionsSDG 17 - Partnerships for the goalsMaritime Anomaly Detection: The use of AIS data to identify Dark Activitymaster thesis203777247