# A Comparative Analysis for Optimizing Machine Learning Model Deployment in IoT Devices
## 3 Methodology
### Decision Support System Framework  
Based on the experimental results, we have proposed a theoretical decision support system for the developers. It can aid in choosing a suitable approach for addressing a specific problem set. First of all, we have taken the type of data associated with the target scenario under consideration, which can be image data or other types of data. Then, our focus is shifted to the minimum threshold for certain parameters that are dependent on the problem at hand. Some of the parameters are hardware-specific like CPU utilization, CPU, and memory consumption. Other parameters include model-specific parameters like model accuracy, precision, recall, and F1-Score.  
This structured methodology provides a comprehensive framework for assessing the environmental impact of ML models in IoT applications, offering insights into the trade-offs between ease of development, performance, and sustainability.  
The pipeline in the decision support system follows a sequential process to handle data from its raw form to the deployment of a machine learning model. This process is detailed below:1. Raw Data Collection: Gathering unprocessed data from various sources relevant to the application domain.
2. Data Transformation: Applying transformations to the raw data to convert them into a more manageable or suitable format for analysis.
3. Data Normalization: Normalizing data to ensure that the model is not biased towards variables with larger scales.
4. Data Cleaning: Removing or correcting data anomalies, missing values, and outliers to improve data quality.
5. Data Compression: Reducing the size of the data through various compression techniques to enhance storage efficiency and speed up processing.
6. Feeding Data to Model: Inputting the processed data into the machine learning model for training.
7. Model Deployment: Deploying the trained model into a real-world environment where it can provide insights or make decisions based on new data.  
This comprehensive pipeline not only optimizes the data handling and model training processes but also ensures that the deployed models are robust, efficient, and suitable for the intended IoT applications. Figure 2 shows the architecture for our decision support system.  
To illustrate the practical application of our decision support system (DSS), we present detailed case studies involving real-world scenarios. For instance, consider an IoT-based smart agriculture system where image data are utilized to monitor crop health. In this case, the DSS guides the developer through selecting an appropriate machine learning model that balances high accuracy in disease detection with minimal energy consumption, ensuring sustainability in a resource-constrained environment. Another example is a smart healthcare system using wearable devices to collect and analyze patient data. Here, the DSS helps in choosing models that not only achieve high precision in anomaly detection but also operate efficiently on low-power devices, enhancing both patient safety and device longevity. These case studies demonstrate the DSS's ability to provide solutions that align with specific application requirements, emphasizing the trade-offs between performance, ease of development, and environmental impact. This practical implementation underscores the DSS's potential to facilitate the development of sustainable and efficient IoT applications across various domains. Figure 3 shows the simple User Interface (UI) Design for our decision support system.  
Figure 2: Decision support system architecture.