DecisionTreeRegressionModel (Spark 3.5.5 JavaDoc) (original) (raw)
Modifier and Type
Method and Description
[BooleanParam](../../../../../org/apache/spark/ml/param/BooleanParam.html "class in org.apache.spark.ml.param")
[cacheNodeIds](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#cacheNodeIds--)()
If false, the algorithm will pass trees to executors to match instances with nodes.
[IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param")
[checkpointInterval](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#checkpointInterval--)()
Param for set checkpoint interval (>= 1) or disable checkpoint (-1).
[DecisionTreeRegressionModel](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html "class in org.apache.spark.ml.regression")
[copy](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#copy-org.apache.spark.ml.param.ParamMap-)([ParamMap](../../../../../org/apache/spark/ml/param/ParamMap.html "class in org.apache.spark.ml.param") extra)
Creates a copy of this instance with the same UID and some extra params.
int
[depth](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#depth--)()
Depth of the tree.
[Vector](../../../../../org/apache/spark/ml/linalg/Vector.html "interface in org.apache.spark.ml.linalg")
[featureImportances](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#featureImportances--)()
[Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String>
[impurity](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#impurity--)()
Criterion used for information gain calculation (case-insensitive).
[Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String>
[leafCol](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#leafCol--)()
Leaf indices column name.
static [DecisionTreeRegressionModel](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html "class in org.apache.spark.ml.regression")
[load](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#load-java.lang.String-)(String path)
[IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param")
[maxBins](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#maxBins--)()
Maximum number of bins used for discretizing continuous features and for choosing how to split on features at each node.
[IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param")
[maxDepth](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#maxDepth--)()
Maximum depth of the tree (nonnegative).
[IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param")
[maxMemoryInMB](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#maxMemoryInMB--)()
Maximum memory in MB allocated to histogram aggregation.
[DoubleParam](../../../../../org/apache/spark/ml/param/DoubleParam.html "class in org.apache.spark.ml.param")
[minInfoGain](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#minInfoGain--)()
Minimum information gain for a split to be considered at a tree node.
[IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param")
[minInstancesPerNode](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#minInstancesPerNode--)()
Minimum number of instances each child must have after split.
[DoubleParam](../../../../../org/apache/spark/ml/param/DoubleParam.html "class in org.apache.spark.ml.param")
[minWeightFractionPerNode](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#minWeightFractionPerNode--)()
Minimum fraction of the weighted sample count that each child must have after split.
int
[numFeatures](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#numFeatures--)()
Returns the number of features the model was trained on.
double
[predict](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#predict-org.apache.spark.ml.linalg.Vector-)([Vector](../../../../../org/apache/spark/ml/linalg/Vector.html "interface in org.apache.spark.ml.linalg") features)
Predict label for the given features.
static [MLReader](../../../../../org/apache/spark/ml/util/MLReader.html "class in org.apache.spark.ml.util")<[DecisionTreeRegressionModel](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html "class in org.apache.spark.ml.regression")>
[read](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#read--)()
[Node](../../../../../org/apache/spark/ml/tree/Node.html "class in org.apache.spark.ml.tree")
[rootNode](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#rootNode--)()
Root of the decision tree
[LongParam](../../../../../org/apache/spark/ml/param/LongParam.html "class in org.apache.spark.ml.param")
[seed](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#seed--)()
Param for random seed.
[DecisionTreeRegressionModel](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html "class in org.apache.spark.ml.regression")
[setVarianceCol](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#setVarianceCol-java.lang.String-)(String value)
String
[toString](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#toString--)()
Summary of the model
[Dataset](../../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<[Row](../../../../../org/apache/spark/sql/Row.html "interface in org.apache.spark.sql")>
[transform](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#transform-org.apache.spark.sql.Dataset-)([Dataset](../../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<?> dataset)
Transforms dataset by reading from featuresCol
, calling predict
, and storing the predictions as a new column predictionCol
.
[StructType](../../../../../org/apache/spark/sql/types/StructType.html "class in org.apache.spark.sql.types")
[transformSchema](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#transformSchema-org.apache.spark.sql.types.StructType-)([StructType](../../../../../org/apache/spark/sql/types/StructType.html "class in org.apache.spark.sql.types") schema)
Check transform validity and derive the output schema from the input schema.
String
[uid](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#uid--)()
An immutable unique ID for the object and its derivatives.
[Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String>
[varianceCol](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#varianceCol--)()
Param for Column name for the biased sample variance of prediction.
[Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String>
[weightCol](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#weightCol--)()
Param for weight column name.
[MLWriter](../../../../../org/apache/spark/ml/util/MLWriter.html "class in org.apache.spark.ml.util")
[write](../../../../../org/apache/spark/ml/regression/DecisionTreeRegressionModel.html#write--)()
Returns an MLWriter
instance for this ML instance.