# A Comparative Analysis for Optimizing Machine Learning Model Deployment in IoT Devices
## 6 Conclusions  
In conclusion, our research provides a comprehensive analysis of the environmental implications of selecting between high-level and low-level programming libraries in IoT machine learning implementations. While the high-level programming library has proven to be more developer-friendly by abstracting most of the inner logic that is close to hardware, the low-level libraries allow for more custom building of the compiled program for training the machine learning model. Hence, both approaches require sacrificing either the time required to establish if a low-level library is used or the environmental surplus if the high-level library is used. By developing a novel algorithm to quantify the carbon footprint of training ML models, we have offered a practical tool for developers to make more informed decisions that prioritize sustainability alongside performance and ease of use. The comparative study between libraries like PyTorch and Libtorch sheds light on the nuanced trade-offs involved in library selection, influencing both computational efficiency and environmental impact.  
Our future work will focus on expanding the scope of our decision support system to include additional programming libraries and platforms, thereby enhancing its utility and relevance. In addition, conducting experiments with other types of data like text, audio, and structured data as used in traditional machine learning may provide further insights regarding the utility of shifting towards low-level ML libraries. We have also planned to integrate real-time data tracking and analysis features to dynamically assess the environmental impact of ML operations. This could enable more adaptive and responsive ML development practices. Furthermore, there are other machine learning libraries that can be used for comparisons. On the higher end, Python has libraries in TensorFlow (particularly TensorFlow-Lite) that have similar possibilities for model training, and on the lower end, there are libraries such as Candle developed by HuggingFace. Exploring more machine learning libraries on resource-constrained devices is another avenue for future work. By continually updating our framework to reflect the latest advancements in technology and sustainability metrics, our aim is to contribute significantly to the reduction in the ecological footprint of machine learning globally.  
The limitations of this work are as follows: Raspberry Pi 4 is a widely supported device, but it may not be indicative of all of the scenarios of deployment of deep learning models. Other resource-constrained devices such as the Jetson Nano and Arduino Nano BLE are lower-profile compared to the Raspberry Pi, and finding limitations on those devices may yield fruitful results. Furthermore, the deployed settings may have bottlenecks in communication and data transmission, not from CPU usage or time taken in training. Research in a realistic network setting is another limitation of this work.  
**Author Contributions:** Conceptualization, M.F.A.S., A.M.I.M.O. and T.R.; Methodology, M.F.A.S., A.M.I.M.O. and T.R.; Software, A.M.I.M.O. and T.R.; Validation, M.F.A.S., A.M.I.M.O. and T.R.; Formal analysis, M.F.A.S., A.M.I.M.O. and T.R.; Investigation, J.F.D. and S.S.I.; Writing--original draft, M.F.A.S., J.F.D., A.M.I.M.O. and T.R.; Writing--review & editing, M.M.I.; Supervision, M.M.I.; Project administration, M.M.I.; Funding acquisition, M.M.I. All authors have read and agreed to the published version of the manuscript.  
Funded by the Institute for Advanced Research Publication Grant of United International University, Ref. No.: IAR-2024-Pub-032.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data presented in this study are available in the article.  
The authors declare no conflict of interest.  
References