In a world increasingly characterized by a deluge of streaming data from applications, IoT devices, and online platforms, Streaming Machine Learning (SML) offers a specialized framework for training and updating algorithms in real-time, while adeptly adapting to changes in data distributions. This approach gains significance as we move towards Edge computing, which brings data processing closer to the point of data generation at the network's edge. However, this paradigm shift also presents challenges, particularly in operating within the constrained computational and storage capacities of Edge devices. This thesis endeavours to address the challenges at the intersection of SML and Edge computing. Focusing on the development of state-of-the-art SML algorithms in C++, the study builds upon the streamDM-C++ library which implements an efficient version of the Hoeffding Tree algorithm, a crucial building block integral to this thesis. The library is optimized and extended. The implemented algorithms include K Nearest Neighbours (KNN), Self Adjusting Memory KNN, Adaptive Random Forests, and Streaming Random Patches. Initially, these algorithms were developed in C++ to improve speed and memory efficiency. Subsequently, they were optimized for deployment on resource-constrained devices, particularly the Arduino Portenta H7 microcontroller. A significant aspect of this research involves adapting these algorithms for efficient operation on Edge devices with limited resources. The adoption of Memory Pools is a key innovation, addressing memory fragmentation issues and enhancing memory efficiency. The thesis culminates in a comparative analysis of these optimized implementations against established SML libraries, evaluating accuracy and resource utilization. The results demonstrate the performance benefits of C++ implementations in SML and the effectiveness of Memory Pools in deploying these algorithms in Edge environments. While high-dimensional datasets pose challenges, the implementations generally show accurate performance in constrained settings.
In un mondo sempre più caratterizzato da un flusso incessante di dati provenienti da applicazioni, dispositivi IoT e piattaforme online, Streaming Machine Learning (SML) offre un approccio per l'apprendimento degli algoritmi in tempo reale, con la capacità di adattarsi alle variazioni nelle distribuzioni dei dati. Questo approccio assume maggiore rilevanza con il progressivo passaggio verso l'Edge computing, che sposta l'elaborazione dei dati più vicino al punto di generazione degli stessi, ai margini della rete. Tuttavia, questo cambio di paradigma presenta anche delle sfide, in particolare considerando le capacità computazionali e di memoria limitate dei dispositivi Edge. Questa tesi mira ad affrontare le sfide che sorgono dall'intersezione tra l'ambito di SML e l'Edge computing. Per lo sviluppo di algoritmi SML in C++, questo lavoro si basa sulla libreria streamDM-C++ che implementa una versione efficiente dell'algoritmo Hoeffding Tree, un elemento fondamentale per questa tesi. La libreria viene ottimizzata ed estesa, includendo algoritmi quali K Nearest Neighbours (KNN), Self Adjusting Memory KNN, Adaptive Random Forests e Streaming Random Patches. Inizialmente sviluppati in C++ per migliorarne la velocità e l'efficienza della memoria, questi algoritmi vengono successivamente ottimizzati per l'impiego su dispositivi a risorse limitate, in particolare il microcontrollore Arduino Portenta H7. Un aspetto chiave di questo lavoro è l'adattamento degli algoritmi implementati per un funzionamento efficiente su dispositivi Edge a risorse limitate, impiegando la tecnica dei Memory Pool per migliorare l'efficienza della memoria. La fase finale della tesi è dedicata a una comparazione di queste implementazioni con librerie SML consolidate, valutando l'accuratezza e l'utilizzo delle risorse. I risultati di questa analisi comparativa evidenziano i vantaggi in termini di prestazioni delle implementazioni in C++ e l'efficacia dell'impiego dei Memory Pool nell'implementazione di questi algoritmi negli ambienti Edge. Sebbene i dataset ad alta dimensionalità rappresentino una limitazione, le implementazioni mostrano generalmente un'accuratezza notevole anche in contesti con risorse limitate.
Extending and Optimizing streamDM-C++ Library for Efficient Streaming ML Algorithms on Microcontrollers
ALLAM, MOHAMED
2022/2023
Abstract
In a world increasingly characterized by a deluge of streaming data from applications, IoT devices, and online platforms, Streaming Machine Learning (SML) offers a specialized framework for training and updating algorithms in real-time, while adeptly adapting to changes in data distributions. This approach gains significance as we move towards Edge computing, which brings data processing closer to the point of data generation at the network's edge. However, this paradigm shift also presents challenges, particularly in operating within the constrained computational and storage capacities of Edge devices. This thesis endeavours to address the challenges at the intersection of SML and Edge computing. Focusing on the development of state-of-the-art SML algorithms in C++, the study builds upon the streamDM-C++ library which implements an efficient version of the Hoeffding Tree algorithm, a crucial building block integral to this thesis. The library is optimized and extended. The implemented algorithms include K Nearest Neighbours (KNN), Self Adjusting Memory KNN, Adaptive Random Forests, and Streaming Random Patches. Initially, these algorithms were developed in C++ to improve speed and memory efficiency. Subsequently, they were optimized for deployment on resource-constrained devices, particularly the Arduino Portenta H7 microcontroller. A significant aspect of this research involves adapting these algorithms for efficient operation on Edge devices with limited resources. The adoption of Memory Pools is a key innovation, addressing memory fragmentation issues and enhancing memory efficiency. The thesis culminates in a comparative analysis of these optimized implementations against established SML libraries, evaluating accuracy and resource utilization. The results demonstrate the performance benefits of C++ implementations in SML and the effectiveness of Memory Pools in deploying these algorithms in Edge environments. While high-dimensional datasets pose challenges, the implementations generally show accurate performance in constrained settings.File | Dimensione | Formato | |
---|---|---|---|
Tesi_Mohamed_Allam.pdf
Open Access dal 22/11/2024
Descrizione: Tesi
Dimensione
8.27 MB
Formato
Adobe PDF
|
8.27 MB | Adobe PDF | Visualizza/Apri |
Executive_Summary_Mohamed_Allam.pdf
non accessibile
Descrizione: Executive Summary
Dimensione
509.24 kB
Formato
Adobe PDF
|
509.24 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/214278