Skip to main content

# embayes Bayesian machine learning classifiers for embedded systems. Train in Python, deploy on microcontroller.

## Key features

Embedded-friendly Classifier

  • Portable C99 code

  • No stdlib required

  • No dynamic allocations

  • Integer/fixed-point math only

  • Single header file include

  • Fast, sub-millisecond classification

Convenient Training

  • API-compatible with [scikit-learn](http://scikit-learn.org)

  • Implemented in Python 3

  • C classifier accessible in Python using pybind11

[MIT licensed](./LICENSE.md)

## Status Minimally useful

  • Gaussian Naive Bayes classifier implemented

  • Tested running on ESP8266 and Linux.

  • On ESP8266, 2 classes and 30 features classify in under 0.5ms

## Installing

Install from git

git clone https://github.com/jonnor/embayes python3 setup.py install –user

## Usage

See [examples/cancer.py](./examples/cancer.py) and [embayes.ino](./embayes.ino)

## TODO

0.2

  • Make estimator a wrapper around sklearn.naivebayes.GaussianNB

  • Make estimator work in sklearn pipeline

  • Make pdf approximation configurable as parameter

1.0

  • Support generating inline C code, not needing model coefficients in RAM

  • Support de/serializing coefficients at runtime

  • Support training on microcontroller

Metadata

Release files for embayes 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embayes 0.1.1
File Size Uploaded
embayes-0.1.1.tar.gz 4.8 kB Details

Release files / embayes-0.1.1.tar.gz

Download URL embayes-0.1.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
caef32c1c84b1a5404593c8279f3b4fa9142e92a50a9054de9c39b81ebd7657b
BLAKE2b-256 checksum
How to use checksums
2f7a540f640593e41c031b35af0123b1d935b54d8dafd5340a059fe80e6c8494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page