How to store data in a tree structure in R?

737 Views Asked by At

I am building a decision tree. Now, I want to store splitting condition or threshold value, parent, leaf and other variable in a tree structure, so that I can call that again and get those values in time of prediction? I am not using any random-forest package as I want to get my tree as like I wish.

1

There are 1 best solutions below

6
On

The list structure is the only way to go. Take a look at how the dendrogram objects are stored.

?as.dendrogram

The other package to review would be igraph.