I already asked this question here: [Can Convolutional Neural Networks (CNN) be represented by a Mathematical formula?](https://stackoverflow.com/questions/55270799/can-convolutional-neural-networks-cnn-be-represented-by-a-mathematical-formula) but I feel that I was not clear enough and also the proposed idea did not work for me.

Let's say that using my computer, I train a certain machine learning algorithm (i.e. naive bayes, decision tree, linear regression, and others). So I already have a trained model which I can give a input value and it returns the result of the prediction (i.e. 1 or 0).

Now, let's say that I still want to give an input and get a predicted output. However, at this time I would like that my input value to be, for example, multiplied by some sort of mathematical formula, weights, or matrix that represents my "trained model".

In other words, I would like that my trained model "transformed" in some sort of formula which I can give an input and get the predicted number.

The reason why I want to do this is because I wanna train a big dataset and use complex prediction model. And use this trained prediciton model in simpler hardwares such as a PIC32 microcontroler. The PIC32 Microntroler would not train the machine learning or store all inputs. Instead, the microcontroler would simple read from the system certain numbers, apply a math formula or some sort of matrix multiplication and give me the predicted output. With that, I can use "fancy" neural networks in much simpler devices that can easily operate math formulas.