# An Evolving TinyML Compression Algorithm for IoT Environments Based on Data Eccentricity

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- The development of the novel TAC evolving algorithm;
- The methodology for the auto-definition of one of the hyperparameters of the TAC model;
- The performance benchmark with other well-known algorithms for validation;
- The definition of a potential new metric for time series compression evaluation, the Compression ${F}_{\beta}$ score (or $C{F}_{\beta}$).

## 2. Data Compression

## 3. Related Works

## 4. Typicality and Eccentricity Data Analytics

#### 4.1. Metrics’ Calculation

**x**represents the data stream in an n-dimensional space. In this case, the ordered sequence of received data can be represented as follows:

#### 4.2. Recursive Case

#### 4.3. Anomaly Detection

## 5. The Proposed Algorithm

#### 5.1. Anomaly Detection with TEDA

#### 5.2. TAC Algorithm

#### 5.3. Auto-Definition of the m Hyperparameter

Algorithm 1: Tiny anomaly compressor. |

input : Data stream X, Float m, Integer $window\_limit$ |

output: keep_point |

1 procedure TAC (Data stream X, Integer $window\_limit$) |

2 while X is active do |

3 read sample ${x}_{k}\in X$ |

4 if $k==1$ then |

5 ${\mu}_{k}={x}_{k}$ |

6 ${\left[{\sigma}^{2}\right]}_{k}^{x}=0$ |

7 if $time==1$ then |

8 keep_point = true |

9 else |

10 keep_point = false |

11 end |

12 else |

13 ${\mu}_{k}=\frac{k-1}{k}{\mu}_{k-1}^{x}+\frac{{x}_{k}}{k}$ |

14 ${\left[{\sigma}^{2}\right]}_{k}^{x}=\frac{k-1}{k}{\left[{\sigma}^{2}\right]}_{k-1}^{x}+\frac{\parallel {x}_{k}-{\mu}_{k}{\parallel}^{2}}{k-1}$ |

15 if $x==last\_value$ and ${\sigma}^{2}==0$ then |

16 keep_point = false |

17 else |

18 ${\xi}_{k}\left(x\right)=\frac{1}{k}+\frac{{({\mu}_{k}^{x}-{x}_{k})}^{T}({\mu}_{k}^{x}-{x}_{k})}{k{\left[{\sigma}^{2}\right]}_{k}^{x}}$ |

19 ${\zeta}_{k}\left(x\right)=\frac{{\xi}_{k}\left(x\right)}{2}$ |

20 if ${\zeta}_{k}\left(x\right)>\frac{{m}^{2}+1}{2k}$ then |

21 is_anomaly = true |

22 anomaly_count = anomaly_count + 1 |

23 else |

24 is_anomaly = false |

25 end |

26 if $anomaly\_count>=window\_limit$ then |

27 resetWindow() |

28 keep_point = true |

29 else |

30 keep_point = false |

31 end |

32 end |

33 end |

34 time = time + 1 |

35 k = k + 1 |

36 last_point = x |

37 end |

#### 5.4. Execution Flowchart

## 6. Case Study Definition

#### 6.1. Dataset Selection

#### 6.2. Objective Definition

#### 6.3. Evaluation Metrics

#### 6.3.1. Compression Error

#### 6.3.2. Compression Rate

#### 6.3.3. Peak-Signal-to-Noise Ratio

#### 6.3.4. NCC

#### 6.4. Proposed CF Score

#### 6.5. Design and Operation of the Benchmark Test

## 7. Results and Discussion

#### 7.1. Dataset 1: Electrical Voltage

#### 7.2. Dataset 2: Electrical Current

## 8. Threats to Validity

- Construct validity: The construction validity verifies the relationship between the theory behind the experiments carried out and the observations found. This threat is mainly related to the algorithms used in the experiment. Therefore, we were confident that the descriptions and pseudocodes found for the studied algorithms were correct since the results were satisfactory.
- Internal validity: Internal threats are relatively linked to the experiment since it is necessary to define different parameters for the algorithms. Thus, to mitigate this threat, a grid-search was performed on each of the models analyzed.
- External validity: External threats refer to the ability to generalize our findings and conclusions appropriately to other contexts. In this study, the experiments were carried out with large sets of data (voltage and current), which allowed us to analyze the compression. Although the tests were executed only on two datasets, we were confident that the results for other sets were similar.

## 9. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

AMMMO | Adaptive Multi-Model Middle-Out |

CD | Compression Deviation |

CE | Compression Error |

CR | Compression Rate |

DCT | Discrete Cosine Transform |

IDEALEM | Dynamic Extensible Adaptive Locally Exchangeable Measures |

DWT | Discrete Wavelet Transform |

EDA | Empirical Data Analysis |

EMA | Exponential Moving Average |

FWHT | Fast Walsh–Hadamard Transform |

IoT | Internet of Things |

KPI | Key Performance Indicators |

MAE | Mean Absolute Error |

ML | Machine Learning |

MSE | Mean-Squared Error |

NCC | Normalized Cross-Correlation |

PSNR | Peak-Signal-to-Noise Ratio |

RSME | Root Mean-Squared Error |

SDT | Swing Door Trending |

TAC | Tiny Anomaly Compressor |

TEDA | Typicality and Eccentricity Data Analytics |

## References

- Marafie, Z.; Lin, K.; Zhai, Y.; Li, J. ProActive Fintech: Using Intelligent IoT to Deliver Positive InsurTech Feedback. In Proceedings of the 2018 IEEE 20th Conference on Business Informatics (CBI), Vienna, Austria, 11–14 July 2018; Volume 2, pp. 72–81. [Google Scholar]
- Zanella, A.; Bui, N.; Castellani, A.; Vangelista, L.; Zorzi, M. Internet of things for smart cities. IEEE Internet Things J.
**2014**, 1, 22–32. [Google Scholar] [CrossRef] - Diniz da Silva, M.B.; Vieira, E.; Silva, I.; Silva, D.; Ferrari, P.; Rinaldi, S.; Carvalho, D.F. A customer feedback platform for vehicle manufacturing in Industry 4.0. In Proceedings of the 2018 IEEE Symposium on Computers and Communications (ISCC), Natal, Brazil, 25–28 June 2018; pp. 1249–1254. [Google Scholar]
- Al Homssi, B.; Al-Hourani, A.; Magowe, K.; Delaney, J.; Tom, N.; Ying, J.; Wolf, H.; Maselli, S.; Kandeepan, S.; Wang, K.; et al. A Framework for the Design and Deployment of Large-Scale LPWAN Network for Smart Cities Applications. IEEE Internet Things Mag.
**2020**. [Google Scholar] [CrossRef] - Silva, M.; Vieira, E.; Signoretti, G.; Silva, I.; Silva, D.; Ferrari, P. A Customer Feedback Platform for Vehicle Manufacturing Compliant with Industry 4.0 Vision. Sensors
**2018**, 18, 3298. [Google Scholar] [CrossRef] [PubMed][Green Version] - Zhang, Z.; Li, C.; Peng, S.; Pei, X. A new task offloading algorithm in edge computing. EURASIP J. Wirel. Commun. Netw.
**2021**, 2021, 17. [Google Scholar] [CrossRef] - Banbury, C.; Zhou, C.; Fedorov, I.; Matas, R.; Thakker, U.; Gope, D.; Janapa Reddi, V.; Mattina, M.; Whatmough, P. Micronets: Neural Network Architectures for Deploying Tinyml Applications on Commodity Microcontrollers. Available online: https://proceedings.mlsys.org/paper/2021/file/a3c65c2974270fd093ee8a9bf8ae7d0b-Paper.pdf (accessed on 16 June 2021).
- Magsi, H.; Sodhro, A.H.; Zahid, N.; Pirbhulal, S.; Wang, L.; Al-Rakhami, M.S. A Novel Adaptive Battery-Aware Algorithm for Data Transmission in IoT-Based Healthcare Applications. Electronics
**2021**, 10, 367. [Google Scholar] [CrossRef] - Azar, J.; Makhoul, A.; Barhamgi, M.; Couturier, R. An energy efficient IoT data compression approach for edge machine learning. Future Gener. Comput. Syst.
**2019**, 96, 168–175. [Google Scholar] [CrossRef][Green Version] - Lounas, R.; Salhi, D.E.; Mokrani, H.; Djerbi, R.; Bennai, M.T. Towards a Smart Data Transmission Strategy for IoT Monitoring Systems: Application to Air Quality Monitoring. In Proceedings of the 2019 International Conference on Theoretical and Applicative Aspects of Computer Science (ICTAACS), Skikda, Algeria, 15–16 December 2019; Volume 1, pp. 1–7. [Google Scholar]
- Correa, J.D.A.; Pinto, A.S.R.; Montez, C.; Leão, E. Swinging Door Trending Compression Algorithm for IoT Environments. In Anais do IX Simpósio Brasileiro de Engenharia de Sistemas Computacionais; SBC: Porto Alegre, Brasil, 2019; pp. 143–148. [Google Scholar]
- Signoretti, G.; Silva, M.; Araujo, J.; Silva, I.; Silva, D.; Ferrari, P.; Sisinni, E. A Dependability Evaluation for OBD-II Edge Devices: An Internet of Intelligent Vehicles Perspective. In Proceedings of the 2019 9th Latin-American Symposium on Dependable Computing (LADC), Natal, Brazil, 19–21 November 2019; pp. 1–9. [Google Scholar]
- Sodhro, A.H.; Sangaiah, A.K.; Sodhro, G.H.; Lohano, S.; Pirbhulal, S. An energy-efficient algorithm for wearable electrocardiogram signal processing in ubiquitous healthcare applications. Sensors
**2018**, 18, 923. [Google Scholar] [CrossRef] [PubMed][Green Version] - Yamaoka, H.; Itakura, K.; Takahashi, E.; Nakagawa, G.; Michaelis, J.; Kanemasa, Y.; Ueki, M.; Matsumoto, T.; Take, R.; Tanie, S.; et al. Dracena: A Real-Time IoT Service Platform Based on Flexible Composition of Data Streams. In Proceedings of the 2019 IEEE/SICE International Symposium on System Integration (SII), Paris, France, 14–16 January 2019; pp. 596–601. [Google Scholar]
- Shukla, A.; Simmhan, Y. Benchmarking distributed stream processing platforms for iot applications. In Proceedings of the Technology Conference on Performance Evaluation and Benchmarking 2016, New Delhi, India, 5–9 September 2016; pp. 90–106. [Google Scholar]
- Lu, T.; Xia, W.; Zou, X.; Xia, Q. Adaptively Compressing IoT Data on the Resource-Constrained Edge. Available online: https://www.usenix.org/conference/hotedge20/presentation/lu (accessed on 16 June 2021).
- Uthayakumar, J.; Vengattaraman, T.; Dhavachelvan, P. A survey on data compression techniques: From the perspective of data quality, coding schemes, data type and applications. J. King Saud Univ. Comput. Inf. Sci.
**2018**. [Google Scholar] [CrossRef] - Ferrari, P.; Sisinni, E.; Carvalho, D.F.; Signoretti, G.; da Silva, M.D.; Silva, I.; Silva, D. Using LoRaWAN smart city infrastructure as backup network for Industry 4.0 enabled vehicles. In Anais do IX Simpósio Brasileiro de Engenharia de Sistemas Computacionais; SBC: Porto Alegre, Brasil, 2019; pp. 119–124. [Google Scholar]
- Sisinni, E.; Ferrari, P.; Fernandes Carvalho, D.; Rinaldi, S.; Pasetti, M.; Flammini, A.; Depari, A. A LoRaWAN range extender for Industrial IoT. IEEE Trans. Ind. Inform.
**2019**, 16, 1. [Google Scholar] [CrossRef] - Georgiou, O.; Raza, U. Low power wide area network analysis: Can LoRa scale? IEEE Wirel. Commun. Lett.
**2017**, 6, 162–165. [Google Scholar] [CrossRef][Green Version] - Hu, Z.; Wang, D.; Li, Z.; Sun, M.; Wang, W. Differential Compression for Mobile Edge Computing in Internet of Vehicles. In Proceedings of the 2019 International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), Barcelona, Spain, 21–23 October 2019; pp. 336–341. [Google Scholar]
- Nobre, M.; Silva, I.; Guedes, L.A.; Portugal, P. Towards a WirelessHART module for the ns-3 simulator. In Proceedings of the 2010 IEEE 15th Conference on Emerging Technologies Factory Automation (ETFA 2010), Bilbao, Spain, 13–16 September 2010; pp. 1–4. [Google Scholar]
- Fedorov, I.; Adams, R.P.; Mattina, M.; Whatmough, P. Sparse: Sparse architecture search for CNNs on resource-constrained microcontrollers. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; pp. 4978–4990. [Google Scholar]
- Porambage, P.; Okwuibe, J.; Liyanage, M.; Ylianttila, M.; Taleb, T. Survey on multi-access edge computing for internet of things realization. IEEE Commun. Surv. Tutor.
**2018**, 20, 2961–2991. [Google Scholar] [CrossRef][Green Version] - Mikhaylov, K.; Petrov, V.; Gupta, R.; Lema, M.A.; Galinina, O.; Andreev, S.; Koucheryavy, Y.; Valkama, M.; Pouttu, A.; Dohler, M. Energy Efficiency of Multi-Radio Massive Machine-Type Communication (MR-MMTC): Applications, Challenges, and Solutions. IEEE Commun. Mag.
**2019**, 57, 100–106. [Google Scholar] [CrossRef] - Mao, Y.; You, C.; Zhang, J.; Huang, K.; Letaief, K.B. A Survey on Mobile Edge Computing: The Communication Perspective. IEEE Commun. Surv. Tutor.
**2017**, 19, 2322–2358. [Google Scholar] [CrossRef][Green Version] - Maitra, S.; Richards, D.; Abdelgawad, A.; Yelamarthi, K. Performance Evaluation of IoT Encryption Algorithms: Memory, Timing, and Energy. In Proceedings of the 2019 IEEE Sensors Applications Symposium (SAS), Sophia Antipolis, France, 11–13 March 2019; pp. 1–6. [Google Scholar]
- Premsankar, G.; Di Francesco, M.; Taleb, T. Edge Computing for the Internet of Things: A Case Study. IEEE Internet Things J.
**2018**, 5, 1275–1284. [Google Scholar] [CrossRef][Green Version] - Wang, X.; Magno, M.; Cavigelli, L.; Benini, L. FANN-on-MCU: An open-source toolkit for energy-efficient neural network inference at the edge of the Internet of Things. IEEE Internet Things J.
**2020**, 7, 4403–4417. [Google Scholar] [CrossRef] - Guberovic, E.; Krišto, F.; Krivic, P.; Cavrak, I. Assessing compression algorithms on IoT sensor nodes. In Proceedings of the 2019 42nd International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 20–24 May 2019; pp. 913–918. [Google Scholar]
- Mahdavinejad, M.; Rezvan, M.; Barekatain, M.; Adibi, P.; Barnaghi, P.; Sheth, A. Machine learning for internet of things data analysis: A survey. Digit. Commun. Netw.
**2018**, 4, 161–175. [Google Scholar] [CrossRef] - Gorospe, J.; Mulero, R.; Arbelaitz, O.; Muguerza, J.; Antón, M.Á. A Generalization Performance Study Using Deep Learning Networks in Embedded Systems. Sensors
**2021**, 21, 1031. [Google Scholar] [CrossRef] - Gopinath, S.; Ghanathe, N.; Seshadri, V.; Sharma, R. Compiling KB-sized machine learning models to tiny IoT devices. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, Phoenix, AZ, USA, 22–26 June 2019; pp. 79–95. [Google Scholar]
- Bengio, Y.; Courville, A.; Vincent, P. Representation learning: A review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell.
**2013**, 35, 1798–1828. [Google Scholar] [CrossRef] [PubMed] - Zoppi, T.; Ceccarelli, A.; Bondavalli, A. Into the Unknown: Unsupervised Machine Learning Algorithms for Anomaly-Based Intrusion Detection. In Proceedings of the 2020 50th Annual IEEE-IFIP International Conference on Dependable Systems and Networks-Supplemental Volume (DSN-S), Valencia, Spain, 29 June–2 July 2020. [Google Scholar]
- Angelov, P.P.; Gu, X. Empirical Approach to Machine Learning; Springer: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
- Angelov, P. Anomaly detection based on eccentricity analysis. In Proceedings of the 2014 IEEE Symposium on Evolving and Autonomous Learning Systems (EALS), Orlando, FL, USA, 9–12 December 2014; pp. 1–8. [Google Scholar]
- Signoretti, G.; Silva, M.; Araujo, J.; Guedes, L.A.; Silva, I.; Sisinni, E.; Ferrari, P. Performance Evaluation of an evolving data compression algorithm embedded into an OBD-II edge device. In Proceedings of the 2020 IEEE International Workshop on Metrology for Industry 4.0 IoT, Roma, Italy, 3–5 June 2020; pp. 696–701. [Google Scholar]
- Yu, X.; Peng, Y.; Li, F.; Wang, S.; Shen, X.; Mai, H.; Xie, Y. Two-Level Data Compression using Machine Learning in Time Series Database. In Proceedings of the 2020 IEEE 36th International Conference on Data Engineering (ICDE), Dallas, TX, USA, 20–24 April 2020; pp. 1333–1344. [Google Scholar]
- Hamdan, S.; Awaian, A.; Almajali, S. Compression Techniques Used in Iot: A Comparitive Study. In Proceedings of the 2019 2nd International Conference on new Trends in Computing Sciences (ICTCS), Amman, Jordan, 9–11 October 2019; pp. 1–5. [Google Scholar]
- Moon, A.; Kim, J.; Zhang, J.; Son, S.W. Evaluating fidelity of lossy compression on spatiotemporal data from an IoT enabled smart farm. Comput. Electron. Agric.
**2018**, 154, 304–313. [Google Scholar] [CrossRef] - Silva, I.M.D.; Guedes, L.A.; Vasques, F. Performance evaluation of a compression algorithm for wireless sensor networks in monitoring applications. In Proceedings of the 2008 IEEE International Conference on Emerging Technologies and Factory Automation, Hamburg, Germany, 15–18 September 2008; pp. 672–678. [Google Scholar]
- Bristol, E.H. Swinging door trending: Adaptive trend recording. In Proceedings of the ISA National Conference, 1990; pp. 749–753. Available online: https://ci.nii.ac.jp/naid/10030606241/ (accessed on 16 June 2021).
- Xu, X.-D.; Fu, Y.-P. The Research and Improvement of SDT Algorithm for Historical Data in SCADA. ITM Web Conf.
**2017**, 11, 01009. [Google Scholar] [CrossRef][Green Version] - Neto, E.J.M.; Augusto, L.; Souza, D.C.; Guedes, L.A. Adaptive Swinging Door Trending: Um Algoritmo Adaptativo para Compressão de Dados em Tempo Real. In Proceedings of the Anais do XX Congresso Brasileiro de Automática, Belo Horizonte, Brazil, 20–24 September 2014. [Google Scholar]
- Gibson, J.K.; Lee, D.; Choi, J.; Sim, A. Dynamic Online Performance Optimization in Streaming Data Compression. In Proceedings of the 2018 IEEE International Conference on Big Data (Big Data), Seattle, WA, USA, 10–13 December 2018; pp. 534–541. [Google Scholar]
- Park, J.; Park, H.; Choi, Y. Data compression and prediction using machine learning for industrial IoT. In Proceedings of the 2018 International Conference on Information Networking (ICOIN), Chiang Mai, Thailand, 10–12 January 2018; pp. 818–820. [Google Scholar]
- Angelov, P. Outside the Box: An Alternative Data Analytics Framework. J. Autom. Mob. Robot. Intell. Syst.
**2014**, 8, 29–35. [Google Scholar] [CrossRef] - Sielly Jales Costa, B.; Bezerra, C.G.; Guedes, L.A.; Angelov, P.P. Online fault detection based on Typicality and Eccentricity Data Analytics. In Proceedings of the 2015 International Joint Conference on Neural Networks (IJCNN), Killarney, Ireland, 12–17 July 2015; pp. 1–6. [Google Scholar]
- Bezerra, C.G.; Sielly Jales Costa, B.; Guedes, L.A.; Angelov, P.P. A new evolving clustering algorithm for online data streams. In Proceedings of the 2016 IEEE Conference on Evolving and Adaptive Intelligent Systems (EAIS), Natal, Brazil, 23–25 May 2016; pp. 162–168. [Google Scholar]
- Angelov, P.P.; Gu, X.; Gutierrez, G.; Iglesias, J.A.; Sanchis, A. Autonomous Data Density based clustering method. In Proceedings of the 2016 International Joint Conference on Neural Networks (IJCNN), Vancouver, BC, Canada, 24–29 July 2016; pp. 2405–2413. [Google Scholar]
- Kangin, D.; Angelov, P.; Iglesias, J.A. Autonomously evolving classifier TEDAClass. Inf. Sci.
**2016**, 366, 1–11. [Google Scholar] [CrossRef][Green Version] - Angelov, P. Typicality distribution function—A new density-based data analytics tool. In Proceedings of the 2015 International Joint Conference on Neural Networks (IJCNN), Killarney, Ireland, 12–17 July 2015; pp. 1–8. [Google Scholar]
- Kangin, D.; Angelov, P.; Iglesias, J.; Sanchis de Miguel, A. Evolving classifier TEDAClass for big data. Procedia Comput. Sci.
**2015**, 53, 9–18. [Google Scholar] [CrossRef] - Martins, R.S.; Angelov, P.; Sielly Jales Costa, B. Automatic Detection of Computer Network Traffic Anomalies based on Eccentricity Analysis. In Proceedings of the 2018 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), Rio de Janeiro, Brazil, 8–13 July 2018; pp. 1–8. [Google Scholar]
- Saw, J.G.; Yang, M.C.K.; Mo, T.C. Chebyshev Inequality with Estimated Mean and Variance. Am. Stat.
**1984**, 38, 130–132. [Google Scholar] - Balanda, K.P.; MacGillivray, H. Kurtosis: A critical review. Am. Stat.
**1988**, 42, 111–119. [Google Scholar] - Flammini, A.; Pasetti, M.; Rinaldi, S.; Bellagente, P.; Ciribini, A.C.; Tagliabue, L.C.; Zavanella, L.E.; Zanoni, S.; Oggioni, G.; Pedrazzi, G. A Living Lab and Testing Infrastructure for the Development of Innovative Smart Energy Solutions: The eLUX Laboratory of the University of Brescia. In Proceedings of the 2018 AEIT International Annual Conference, Bari, Italy, 3–5 October 2018; pp. 1–6. [Google Scholar]
- Rinaldi, S.; Pasetti, M.; Flammini, A.; Ferrari, P.; Sisinni, E.; Simoncini, F. A Testing Framework for the Monitoring and Performance Analysis of Distributed Energy Systems. IEEE Trans. Instrum. Meas.
**2019**, 68, 3831–3840. [Google Scholar] [CrossRef] - Jin, F.; Fieguth, P.; Winger, L.; Jernigan, E. Adaptive Wiener filtering of noisy images and image sequences. In Proceedings of the 2003 International Conference on Image Processing (Cat. No.03CH37429), Barcelona, Spain, 14–17 September 2003; Volume 3. [Google Scholar]
- Yoo, J.C.; Han, T.H. Fast normalized cross-correlation. Circuits Syst. Signal Process.
**2009**, 28, 819–843. [Google Scholar] [CrossRef] - Tsai, D.M.; Lin, C.T.; Chen, J.F. The evaluation of normalized cross correlations for defect detection. Pattern Recognit. Lett.
**2003**, 24, 2525–2535. [Google Scholar] [CrossRef] - Hand, D.; Christen, P. A note on using the F-measure for evaluating record linkage algorithms. Stat. Comput.
**2018**, 28, 539–547. [Google Scholar] [CrossRef][Green Version] - Xu, Z. Fuzzy harmonic mean operators. Int. J. Intell. Syst.
**2009**, 24, 152–172. [Google Scholar] [CrossRef] - Ferger, W.F. The nature and use of the harmonic mean. J. Am. Stat. Assoc.
**1931**, 26, 36–40. [Google Scholar] [CrossRef]

**Figure 3.**Variation of the compression rate, NCC, and CF score for the grid-search evaluated by varying the hyperparameter for the TAC and SDT models. $\beta =1$. (

**a**) TAC (Auto-m); (

**b**) SDT.

Features | Online Algorithm | Machine Learning | Lightweight Solution | Data Are Encoded | |
---|---|---|---|---|---|

Works | |||||

Bristol [43] | yes | no | yes | no | |

Correa et al. [11] | yes * | no | yes | no | |

Moon et al. [41] | no | no | no | yes | |

Gibson et al. [46] | yes | no | no | yes | |

Lounas et al. [10] | no | no | no | yes | |

Park et al. [47] | no | yes | no | yes | |

Azar et al. [9] | yes | no | yes | yes | |

Yu et al. [39] | no | yes | no | yes | |

Proposed Work | yes | yes | yes | no |

Dataset | Samples | Min | Max | Mean | Standard Deviation | Skewness |
---|---|---|---|---|---|---|

Voltage | 50,879 | 0.0 | 231.0 | 169.739 | 39.198 | −2.633 |

Current | 50,879 | 0.0 | 7.2 | 2.627 | 2.119 | 0.374 |

Algorithm | Hyperparameters for $\mathit{\beta}=1$ | Hyperparameters for $\mathit{\beta}=4$ |
---|---|---|

TAC | $window\_limit=35$, $m=0.2$ | $window\_limit=7$, $m=0.1$ |

TAC (Auto-m) | $window\_limit=32$ | $window\_limit=4$ |

SDT | $comp\_deviation=1.4$ | $comp\_deviation=0.4$ |

DCT | $delta=0.998$ | $delta=0.999$ |

$\mathit{\beta}$ | Algorithm | CR (%) | NCC | CF${}_{1}$ Score | MSE | MAE | PSNR |
---|---|---|---|---|---|---|---|

1 | TAC | 97.4 | 0.9865 | 0.9802 | 41.3406 | 1.4593 | 31.1085 |

TAC (Auto-m) | 97.49 | 0.9849 | 0.9799 | 46.2367 | 1.6009 | 30.6224 | |

SDT | 97.15 | 0.9807 | 0.9761 | 60.2682 | 2.3412 | 29.4714 | |

DCT | 98.8 | 0.9801 | 0.984 | 60.6456 | 4.2092 | 29.4442 | |

4 | TAC | 91.5 | 0.9948 | 0.9898 | 16.0263 | 0.738 | 35.2239 |

TAC (Auto-m) | 90.31 | 0.9887 | 0.9887 | 16.7838 | 0.6913 | 35.0233 | |

SDT | 91.56 | 0.9896 | 0.9849 | 32.0155 | 1.2412 | 32.2186 | |

DCT | 96.8 | 0.9901 | 0.9888 | 30.3387 | 2.9515 | 32.4523 |

Algorithm | Hyperparameters for $\mathit{\beta}=1$ | Hyperparameters for $\mathit{\beta}=4$ |
---|---|---|

TAC | $window\_limit=40$, $m=0.6$ | $window\_limit=15$, $m=0.1$ |

TAC (Auto-m) | $window\_limit=40$ | $window\_limit=12$ |

SDT | $comp\_deviation=0.3$ | $comp\_deviation=0.1$ |

DCT | $delta=0.992$ | $delta=0.997$ |

$\mathit{\beta}$ | Algorithm | CR (%) | NCC | CF${}_{1}$ Score | MSE | MAE | PSNR |
---|---|---|---|---|---|---|---|

1 | TAC | 98.33 | 0.9919 | 0.9876 | 0.0723 | 0.1038 | 28.5547 |

TAC (Auto-m) | 98.24 | 0.9916 | 0.987 | 0.0753 | 0.101 | 28.377 | |

SDT | 98.98 | 0.9883 | 0.989 | 0.1263 | 0.2671 | 26.1318 | |

DCT | 99.48 | 0.9899 | 0.9923 | 0.0908 | 0.1845 | 27.5638 | |

4 | TAC | 95.26 | 0.9972 | 0.9944 | 0.0256 | 0.0542 | 33.0617 |

TAC (Auto-m) | 95.37 | 0.9963 | 0.9937 | 0.0337 | 0.0602 | 31.8695 | |

SDT | 97.2 | 0.9958 | 0.9943 | 0.0392 | 0.1066 | 31.2167 | |

DCT | 97.31 | 0.9962 | 0.9948 | 0.0342 | 0.1117 | 31.8127 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Signoretti, G.; Silva, M.; Andrade, P.; Silva, I.; Sisinni, E.; Ferrari, P. An Evolving TinyML Compression Algorithm for IoT Environments Based on Data Eccentricity. *Sensors* **2021**, *21*, 4153.
https://doi.org/10.3390/s21124153

**AMA Style**

Signoretti G, Silva M, Andrade P, Silva I, Sisinni E, Ferrari P. An Evolving TinyML Compression Algorithm for IoT Environments Based on Data Eccentricity. *Sensors*. 2021; 21(12):4153.
https://doi.org/10.3390/s21124153

**Chicago/Turabian Style**

Signoretti, Gabriel, Marianne Silva, Pedro Andrade, Ivanovitch Silva, Emiliano Sisinni, and Paolo Ferrari. 2021. "An Evolving TinyML Compression Algorithm for IoT Environments Based on Data Eccentricity" *Sensors* 21, no. 12: 4153.
https://doi.org/10.3390/s21124153