Represent a random forest model as an equation in a paper I'm writing a paper that uses a random forest algorithm. I want to represent the model in the paper.
But I was wondering how to illustrate a random forest model using an equation in a paper, with the target variable, y and features, x.
I hope this makes sense.
 A: You won't be able to write down the full specification of the fitted RF the way you could, e.g., write down a regression equation. The best you can likely do is to explain what software you used (with version), and the exact parameters you provided to your fitting method (ideally also the RNG seed). Then in principle anyone who has your exact data should be able to replicate your model. Plots of the fitted response against important predictors are also often helpful.
A: Realistically, this cannot be done. It would require you to give every decision tree in your random forest, and that’s a lot of trees! The best you can realistically do is, as Stephan Kolassa wrote, say exactly what you did. If you publish your code on a personal website, GitHub, or journal website, that’s even better!
If you just want to illustrate the idea of a random forest in your paper, however, it might make sense to make up three small decision trees, show how an observation makes its way down each tree, and then calculate the mean.
