spark-tree-plotting
spark-tree-plotting copied to clipboard
A simple tool for plotting Spark ML's Decision Trees
Hi, We were happy to find this lib as we need to visualize the decision tree created using ML, but we are afraid that it cannot support the current Spark...
Main changes: 1) support SBT 1.6.2 2) support spark 3.1.* and latest databricks in Azure 3) Skip spark dependency in assembly 4) Package the python script based on standard pip...
The online method doesn't work, so I use the offline method to install, I start a session like this: spark = SparkSession \ .builder \ .appName("Python Spark SQL basic example")...
Unable to run: ``` tree_json = generate_tree_json(dtree_model, withNodeIDs=True # each tree with node ID ) ``` ` 265 sc = SparkContext.getOrCreate() 266 --> 267 json_tree = sc._jvm.com.vfive.spark.ml.SparkMLTree(DecisionTreeClassificationModel._java_obj).toJsonPlotFormat() 268 269 if...
On trying to generate the json representation of a tree model by calling `tree_json = generate_tree_json(model)`, the following error is thrown: AttributeError: 'DecisionTreeModel' object has no attribute '_java_obj'