grf
grf copied to clipboard
Plot tree is too large to visualize
Hello, I estimated a causal forest on a large sample (n=10,000) with a reasonable number of predictors (p=15) and I am curious to see some of the decision trees. When I plot() a get_tree() object the resulting tree diagram is far too large to fit into an R studio window, and I am unsure how to save this object as a pdf or other file to visualize in a separate software (Preview, adobe). Is there a way to save these tree diagrams for better viewing? Or maybe limit the depth of the tree just for visualization purposes? Perhaps there is a way to do this with DiagrammeR but I am not familiar with those tools. Thank you for any advice!
Hi @PhilipSpechler, n=10 000 is probably too much to visualize unless each tree is very shallow. If a simple tree-based treatment assignment policy is what you're after, you can have a look at policy tree: https://github.com/grf-labs/policytree (a tutorial is here)