Embedded machine learning