breuderink / epsilon

Epsilon is a library with functions for machine learning and statistics written in plain C. It is intended to run on microcontrollers.
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link
algorithms c edge-ai embedded fwht machine-learning microcontrollers minimal statistics tiny-ml welford xorshift

Epsilon

Epsilon is a library with small functions for machine learning and statistics written in plain C. The functions are decoupled and well tested.

tests and examples

Motivation

Most machine learning focuses on training large models on powerful hardware. After training, researchers freeze the models and apply them to new data. These models are too big to run on microcontrollers. One can compress these models to make them fit. The compressed model can make predictions for new data. But the model itself remains static, even if the environment changes.

An alternative approach is to optimise the model on the microcontroller itself. In this case, the model can adapt to new data. This requires particular memory-efficient algorithms. Further, the optimization process should be reliable. Epsilon provides methods to train and apply machine learning methods on microcontrollers.

These algorithms should run on microcontrollers, such as the Raspberry Pi Pico, the BBC micro:bit, the Arduino Nano 33 BLE Sense or even the ATtiny85 8-bit microcontroller.

To allow machine learning to run on microcontrollers, the implementations:

Building

Epsilon uses CMake for building. Create a build directory, and configure the project. In the repository root, configure and build the project. Then run the unit tests and the examples with CTest:

$ mkdir build && cd build
$ cmake ..
$ cmake --build .
$ ctest

Algorithms

Pseudo-random number generation

Hashing

Online statistics

Feature extraction

Regression

Classification

Other solutions for Tiny ML or Edge AI