# 1. Embedded AI — Linear Regression

‘machine learning is statistics minus any checking of models and assumptions’. — Brian D. Ripley

This is the first in a series of articles on embedded AI. To get a solid grip on the subject we want to construct simple machine learning models from scratch. As embedded AI needs to run on devices with limited resources (memory, processing speed, and power), it isn’t always possible to use the existing frameworks. The additional benefit is when we can use these packages, an in-depth knowledge of their processes will allow us to implement better solutions.

In this initial part, we will cover some necessary theory so that we are all talking the same language. In Part 2 we will deploy an ML model and look at solving the very real problem of estimating the state of charge of a battery, connected to an Arduino, based on its voltage.

## Machine Learning vs Statistics

Is Machine Learning (ML) just a fancy name for applied statistics? In some ways it probably is but as engineers our concern is with finding a model which is *just* good enough. Anything else is over engineering., although what *good enough* means will depend on the application. This leads to different objectives between ML practitioners and statisticians (Figure 1), ML is focussed on predicting outcomes whilst in statistics, users try to…