Class DecisionTreeModelReadWrite

Object
org.apache.spark.ml.tree.DecisionTreeModelReadWrite

public class DecisionTreeModelReadWrite extends Object
Helper classes for tree model persistence
  • Constructor Details

    • DecisionTreeModelReadWrite

      public DecisionTreeModelReadWrite()
  • Method Details

    • loadTreeNodes

      public static Node loadTreeNodes(String path, org.apache.spark.ml.util.DefaultParamsReader.Metadata metadata, SparkSession sparkSession)
      Load a decision tree from a file.
      Parameters:
      path - (undocumented)
      metadata - (undocumented)
      sparkSession - (undocumented)
      Returns:
      Root node of reconstructed tree
    • buildTreeFromNodes

      public static Node buildTreeFromNodes(DecisionTreeModelReadWrite.NodeData[] data, String impurityType)
      Given all data for all nodes in a tree, rebuild the tree.
      Parameters:
      data - Unsorted node data
      impurityType - Impurity type for this tree
      Returns:
      Root node of reconstructed tree