Support for Random Forest Onnx Model #89
Replies: 1 comment
-
Thanks for the post! OMLT does not support random forests at this time. No matter the input format, you will not be able to import a random forest into OMLT. The extension from gradient-boosted trees to random forests would be relatively straightforward. As documented in this paper, the mixed-integer optimization formulations of GBT and RF are similar. But OMLT doesn't currently have the code to read RF from ONNX. OMLT would also need a few changes in the optimization formulations to extend to RF. I'm switching the category of this question from "Q&A" to "Ideas". Basically, this post is a feature request for an extension to RF. We're always happy to get PRs, so feel free to write this extension. Alternatively, perhaps you could consider training a gradient-boosted tree rather than a random forest. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thank you for developing these wonderful functions inside OMLT! In ur example notebook here, the decision tree based GBT is mentioned as an acceptable model for OMLT. I'm wondering if the random forest (RF) model, which is also based on the decision tree algorithm, could be imported to OMLT in the form of onnx as well? If the answer is positive, could you point to the place where I can find any example of it? Cuz I tried to use the sklearn pkg to train and import RF model but failed, does the model training pkg impact the final result? For example, if I switch from sklearn to pytorch/lightgbm will I import RF onnx model to OMLT successfully?
Beta Was this translation helpful? Give feedback.
All reactions