Random forest interpretation in scikit-learn

I use scikit-learn Random Forest Regressor to match a random forest regressor in a dataset. Is it possible to interpret the output in a format where I can implement the model without using scikit-learn or even Python?

The solution should be implemented in a microcontroller or, possibly, even an FPGA . I do analysis and training in Python, but I want to implement it on UC or FPGA.

+6
source share
2 answers

You can check graphviz, which uses a "point language" to store models (which is completely human readable, if you want to create some kind of custom interpreter, it shouldn't be difficult). Scikit-learn has an export_graphviz function. You can load and process the model in C ++ using the boost library read_graphviz or other available custom interpreters.

+3
source

It is not clear what you mean by this part:

Now, I have the results, is it possible to interpret this in some format, where can I implement the fit without using sklearn or even python?

Implement a fitting process for a given dataset? tree topology? choice of parameters?

Regarding the "implementation ... without using sklearn or python", did you mean "bytecode port or binary" or "clean code" a completely new implementation?

Assuming you meant the latter, I would suggest a GPU instead of FPGA or uC.

0
source

Source: https://habr.com/ru/post/944085/


All Articles