# TinyML Algorithms for Big Data Management in Large-Scale IoT Systems
## 4 Experimental Results
### Metrics and Methods  
For the evaluation of the proposed techniques, the following metrics are utilized. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Algorithm** & \begin{tabular}{c} **Federated** \\ **Learning** \\ \end{tabular} & \begin{tabular}{c} **Anomaly** \\ **Detection** \\ \end{tabular} & \
\begin{tabular}{c} **Data Compression** \\ **State** \\ \end{tabular} &
\begin{tabular}{c} **Caching** \\ **Quality** \\ \end{tabular} \\ \hline TinyCleanEDF (Algorithm 1) & ✓ & ✓ & \(\times\) & \(\times\) & ✓ \\ \hline EdgeClusterML (Algorithm 2) & \(\times\) & ✓ & \(\times\) & \(\times\) & \(\times\) \\ \hline CompressEdgeML (Algorithm 3) & \(\times\) & \(\times\) & ✓ & \(\times\) & \(\times\) \\ \hline CacheEdgeML (Algorithm 4) & \(\times\) & \(\times\) & \(\times\) & ✓ & \(\times\) \\ \hline TinyHybridSenseQ (Algorithm 5) & \(\times\) & ✓ & \(\times\) & ✓ & ✓ \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Comparison of proposed algorithms. Data Processing Time (ms): To measure the data processing time in a distributed system such as the one proposed where we have multiple Raspberry Pi devices, we can consider the maximum time taken by any single device as well as the average time across all devices. The equation is provided in Equation (1). \[\text{Data Processing Time}_{\text{total}}=\max(T_{1},T_{2},\dots,T_{n})\quad\text{ and}\quad\text{Data Processing Time}_{\text{avg}}=\frac{\sum_{i=1}^{n}T_{i}}{n} \tag{1}\]  
Model Training Time (ms): For the model training time, we want to measure both the total cumulative time and the longest individual training time across all devices. The calculation is provided in Equation (2). \[\text{Model Training Time}_{\text{total}}=\sum_{i=1}^{n}T_{i}\quad\text{and} \quad\text{Model Training Time}_{\text{max}}=\max(T_{1},T_{2},\dots,T_{n}) \tag{2}\]  
Anomaly Detection Accuracy: For a distributed system, we want to consider not only the overall accuracy but also the consistency of anomaly detection across different nodes. A weighted approach is used where the accuracy of each node is weighted by the number of instances it processes. This is provided in Equation (3). \[\text{Anomaly Detection Accuracy}=\frac{\sum_{i=1}^{n}(w_{i}\times\text{ Accuracy}_{i})}{\sum_{i=1}^{n}w_{i}} \tag{3}\]  
Communication Efficiency: In a large-scale distributed setup, communication efficiency should account for the data transmission efficiency, the overhead of synchronization among nodes, the error rate in data transmission, and the effective utilization of available bandwidth. This comprehensive approach ensures a realistic assessment of communication performance in a distributed system. \[\text{CE}=\left(\frac{D_{\text{u}}}{D_{\text{t}}+O_{\text{sync}}}\right)\times (1-\text{ER})\times\text{BU} \tag{4}\]  
\(CE\) represents Communication Efficiency. \(D_{u}\) is the symbol for Useful Data Transmitted. \(D_{t}\) stands for Total Data Transmitted. \(O_{sync}\) is the Synchronization Overhead. \(ER\) denotes the Error Rate. \(BU\) symbolizes Bandwidth Utilization. Scalability: Scalability in a distributed system can be quantified by measuring how the system's performance changes with the addition of more nodes, considering factors like throughput, response time, load balancing, system capacity, and cost-effectiveness. A higher throughput ratio, a lower response time ratio, and efficient load balancing with increased nodes indicate better scalability.