I have run a RandomForestRegression model in sklearn and saved the output of my decisions trees (n_estimators=50) into 50 .dot
files.
Now I want to save them so I can view them as actual trees.
I am trying this:
import pydotplus
dot_data=r'F:\Sheyenne\Random_Forest\my_tree0.dot'
graph = pydotplus.graph_from_dot_data(dot_data)
graph.write_pdf(r'F:\Sheyenne\Random_Forest\my_tree0.pdf')
but this returns:
AttributeError: 'NoneType' object has no attribute 'write_pdf'