We tend to think that the lowest point of entry for machine learning (ML) is on a Raspberry Pi, which it definitely is not. [EloquentArduino] has been pushing the limits to the low end of the scale, and managed to get a basic classification model running on the ATtiny85.
Using his experience of running ML models on an old Arduino Nano, he had created a generator that can export C code from a scikit-learn
. He tried using this generator to compile a support-vector colour classifier for the ATtiny85, but ran into a problem with the Arduino ATtiny85 compiler not supporting a variadic function used by the generator. Fortunately he had already experimented with an alternative approach that uses a non-variadic function, so he was able to dust that off and get it working. The classifier accepts inputs from an RGB sensor to identify a set of objects by colour. The model ended up easily fitting into the capabilities of the diminutive ATtiny85, using only 41% of the available flash and 4% of the available ram.
It’s important to note what [EloquentArduino] isn’t doing here: running an artificial neural network. They’re just too inefficient in terms of memory and computation time to fit on an ATtiny. But neural nets aren’t the only game in town, and if your task is classifying something based on a few inputs, like reading a gesture from accelerometer data, or naming a color from a color sensor, the approach here will serve you well. We wonder if this wouldn’t be a good solution to the pesky problem of identifying bats by their calls.
We really like how approachable machine learning has become and if you’re keen to give ML a go, have a look at the rest of the EloquentArduino blog, it’s a small goldmine.
We’re getting more and more machine learning related hacks, like basic ML on an Arduino Uno, and Lego sortings using ML on a Raspberry Pi.
it seems “Machine Learning” is what we used to call “programming”.
It is true that if there are more than seven IF statements in a row marketing gets to call it Machine Learning.
The every day use is to write software when you don’t know what the data or function is going to be.
I’m involved in more projects that would recently have had many more programmers in. They’ve been replaced with a few data scientists and someone who knows how to order CPU cycles from AWS.
For example: I worked on scraping data from legal forms, it was far cheaper to use machine learning than to have a few junior developers writing the functionally equivalent regular expressions.
It would be interesting to read more about that ML scraping project, because I still have a hard time imagining all the ways that ML can be useful. Maybe something for a HaD article?
I agree with Ken. Would be great to see an article here about this
This is really interesting. Could you say a little bit more about how that worked?
>The every day use is to write software when you don’t know what the data or function is going to be.
https://dilbert.com/strip/1997-05-09
That’s not an argument for machine learning – that’s an argument against regular expressions.
+1
it seems “Machine Learning” is what we used to call “coding”, which is what we used to call “programming”.
Fixed that for ‘ya. ;)
And before that it was banging two rocks together. Now the rocks are cheaper, and the guy who bangs them is more expensive.
Coding and programming have subtly different uses, it’s not about which one is newer (they both exist since very long).
I’m the author of the post cited.
First of all, “Machine learning” results can’t always be achieved by “manual programming”, because you may not be able to grasp all the facets of your data, if you have a lot of data. Second, ML models can evolve in time without any programmer intervention.
I think it could be more agreeable if you say “it seems Machine Learning is what we used to call statistics”.
Great project (and great site btw) . I plan on spending some serious time with them.
Thank you, I really appreciate your kind words.
Maybe a good comparison to PID process control. PID algorithms adjust parameters (learn) to optimize some process. Programmers use them all the time.
Never used PID in practice, just studied it at university and read some articles. I think the difference is 1) they can “learn” at most 3 parameters (P, I, D) and 2) they don’t learn a decision function, they learn how to follow a set point and are not stationary (the same input, at different times, produces different output). But I may be wrong.
Machine Learning is really just a form of programming using expected input and output examples.
Poorly.
You’re talking about Supervided learning. There’s much more in ML (e.g. Unsupervised and Reinforcement learning).
Great stuff – This helps me to quickly program the tiny chips https://www.tindie.com/products/siktec/attiny-programming-development-arduino-shield/