Class EnsembleModelReadWrite

Object
org.apache.spark.ml.tree.EnsembleModelReadWrite

public class EnsembleModelReadWrite extends Object
  • Constructor Details

    • EnsembleModelReadWrite

      public EnsembleModelReadWrite()
  • Method Details

    • saveImpl

      public static <M extends Params> void saveImpl(M instance, String path, SparkSession sparkSession, org.json4s.JsonAST.JObject extraMetadata)
      Helper method for saving a tree ensemble to disk.

      Parameters:
      instance - Tree ensemble model
      path - Path to which to save the ensemble model.
      extraMetadata - Metadata such as numFeatures, numClasses, numTrees.
      sparkSession - (undocumented)
    • loadImpl

      public static scala.Tuple3<org.apache.spark.ml.util.DefaultParamsReader.Metadata,scala.Tuple2<org.apache.spark.ml.util.DefaultParamsReader.Metadata,Node>[],double[]> loadImpl(String path, SparkSession sparkSession, String className, String treeClassName)
      Helper method for loading a tree ensemble from disk. This reconstructs all trees, returning the root nodes.
      Parameters:
      path - Path given to saveImpl
      className - Class name for ensemble model type
      treeClassName - Class name for tree model type in the ensemble
      sparkSession - (undocumented)
      Returns:
      (ensemble metadata, array over trees of (tree metadata, root node)), where the root node is linked with all descendents
      See Also:
      • saveImpl for how the model was saved