Page 1 of 1

Porting Libraries important for Machine Learning to Micropython

Posted: Tue Mar 30, 2021 12:11 pm
by Mr. Panda
Hi,

Is there any work in progress about migrating ML-related libraries like Pandas and Numpy to Micropython.

I am trying to implement an Isolation Forest https://scikit-learn.org/stable/modules ... orest.html on Pycom LoPy board but could not succeed due to lack of those libraries. I have tried to convert by myself but I guess it is something that I am capable to do it alone.

So, I am just curious if there is any work is being done regarding porting such a libraries? I could not find any on GitHub.

Re: Porting Libraries important for Machine Learning to Micropython

Posted: Tue Mar 30, 2021 1:09 pm
by stijn
There's https://micropython-ulab.readthedocs.io/en/latest which implements core numpy functionality, but it's not really a port (depending on your definition of that): it's implemented from scratch, because numpy etc use the CPython object model which is very different from the MicroPython one. I don't know of any scikit/pandas/... implementations. It would be a huge amount of work to implement all of that. The usual workaround would be sending your data from MicroPython to a remote CPython process and doing calculations there, then sending results back. Could use mqtt for coomunication for instance.

Re: Porting Libraries important for Machine Learning to Micropython

Posted: Thu Apr 01, 2021 12:11 pm
by Mr. Panda
Hi stijn,

Thanks, I will check that module. Currently I can apply Isolation Forest in the fog (Raspberry Pi in my case) and also in the cloud while using edge devices (pycom boards, arduinos) just to collect and forward a data. So, only applying that anomaly detection method at the edge is missing.

Re: Porting Libraries important for Machine Learning to Micropython

Posted: Tue Apr 13, 2021 8:26 am
by tecdroid
Hi,

is it possible to compile this into a mpy module? I don't want to re-compile and re-flash my board permanently..

Re: Porting Libraries important for Machine Learning to Micropython

Posted: Tue Apr 13, 2021 10:27 am
by OlivierLenoir
You can look here, it's a project about Neural Network for MicroPython.