Will my decision tree be plotted as a pdf file have two questions
Why is there a black frame in the upper right corner? How can I modify my grammar? Thanks!
Is the left side True and the right side False? Because the reminder of True and False has not appeared since the second layer. The syntax for drawing is as follows:
dot_data1=io.StringIO() tree.export_graphviz( model,out_file=dot_data1, feature_names=feature_cols, class_names=['0','1'], rounded=True,filled=True, impurity =True ) graph=pydotplus.graph_from_dot_data(dot_data1.getvalue()) graph.write_pdf('1c.pdf')
