问题
I am trying to visualize decision tree structure in pyspark. But all the tools are for data. I could not find any for visualizing tree structure. Or is there a way I can visualize using the rules from toDebugString?
回答1:
I have tried to do the following in order to create a visualization :
- Parse Spark Decision Tree output to a
JSONformat. - Use the
JSONfile as an input to aD3.jsvisualization.
For more code you can refer to my prototype at GitHub here.
来源:https://stackoverflow.com/questions/36139456/how-can-decision-tree-model-in-spark-pyspark-be-visualized