How can decision tree model in Spark (pyspark) be visualized?

被刻印的时光 ゝ 提交于 2019-12-12 09:42:55

问题


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 :

  1. Parse Spark Decision Tree output to a JSON format.
  2. Use the JSON file as an input to a D3.js visualization.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!