title: How do I visualise / plot a decision tree in Apache Spark (PySpark 1.4.1)?
body: <p>I am using Apache Spark Mllib 1.4.1 (PySpark, the python implementation of Spark) to generate a decision tree based on LabeledPoint data I have. The tree generates correctly and I can print it to the terminal (extract the rules as this user calls it <a href="https://stackoverflow.com/questions/31782288/how-to-extract-rules-from-decision-tree-spark-mllib">How to extract rules from decision tree spark MLlib</a>) using:</p>
  
  <pre><code>model = DecisionTree.trainClassifier( ... )
  print(model.toDebugString()
  </code></pre>
  
  <p>But what I want to do is visualize or plot the decision tree rather than printing it to the terminal. Is there any way I can plot the decision tree in PySpark or maybe I can save the decision tree data and use R to plot it? Thanks!</p>