spark-tree-plotting (homepage)

A simple tool for plotting Spark ML's Decision Trees

This module provides a simple tool for plotting an easy to understand graphical representation
of Spark ML's DecisionTreeClassificationModels, very similar to the one Python's Scikit-Learn provides.
Given a DecisionTreeClassificationModel, spark_tree_plotting generates a JSON file with
the relevant metadata in order to plot the tree. Moreover, a simple JSON-to-DOT python
script allows you to plot trees in PySpark in a very simple manner (just as in Scikit-Learn)


Tags

  • 1|machine learning
  • 1|pyspark

How to

Include this package in your Spark Applications using:

spark-shell, pyspark, or spark-submit

> $SPARK_HOME/bin/spark-shell --packages julioasotodv:spark-tree-plotting:0.2

sbt

If you use the sbt-spark-package plugin, in your sbt build file, add:

spDependencies += "julioasotodv/spark-tree-plotting:0.2"

Otherwise,

resolvers += "Spark Packages Repo" at "https://repos.spark-packages.org/"

libraryDependencies += "julioasotodv" % "spark-tree-plotting" % "0.2"

Maven

In your pom.xml, add:
<dependencies>
  <!-- list of dependencies -->
  <dependency>
    <groupId>julioasotodv</groupId>
    <artifactId>spark-tree-plotting</artifactId>
    <version>0.2</version>
  </dependency>
</dependencies>
<repositories>
  <!-- list of other repositories -->
  <repository>
    <id>SparkPackagesRepo</id>
    <url>https://repos.spark-packages.org/</url>
  </repository>
</repositories>

Releases

Version: 0.2 ( dabddc | zip | jar ) / Date: 2017-03-25 / License: MIT / Scala version: 2.11

Version: 0.1 ( 38b78e | zip | jar ) / Date: 2017-03-22 / License: MIT / Scala version: 2.11