I'm trying to build a random forest using model based regression trees in partykit package. I have built a model based tree using mob()
function with a user defined fit()
function which returns an object at the terminal node.
In partykit there is cforest()
which uses only ctree()
type trees. I want to know if it is possible to modify cforest()
or write a new function which builds random forests from model based trees which returns objects at the terminal node. I want to use the objects in the terminal node for predictions. Any help is much appreciated. Thank you in advance.
Edit: The tree I have built is similar to the one here -> https://stackoverflow.com/a/37059827/14168775
How do I build a random forest using a tree similar to the one in above answer?