Skip to content

Commit dd0c0d7

Browse files
committed
minor: some docs
Signed-off-by: Manish Amde <manish9ue@gmail.com>
1 parent 0dd7659 commit dd0c0d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,21 @@ import org.apache.spark.mllib.tree.configuration.QuantileStrategy._
2929
import org.apache.spark.mllib.tree.configuration.FeatureType._
3030
import org.apache.spark.mllib.tree.configuration.Algo._
3131

32+
/*
33+
A class that implements a decision tree algorithm for classification and regression.
34+
It supports both continuous and categorical features.
3235
36+
@param strategy The configuration parameters for the tree algorithm which specify the type of algorithm (classification,
37+
regression, etc.), feature type (continuous, categorical), depth of the tree, quantile calculation strategy, etc.
38+
*/
3339
class DecisionTree(val strategy : Strategy) extends Serializable with Logging {
3440

41+
/*
42+
Method to train a decision tree model over an RDD
43+
44+
@param input RDD of [[org.apache.spark.mllib.regression.LabeledPoint]] used as training data for DecisionTree
45+
@return a DecisionTreeModel that can be used for prediction
46+
*/
3547
def train(input : RDD[LabeledPoint]) : DecisionTreeModel = {
3648

3749
//Cache input RDD for speedup during multiple passes

0 commit comments

Comments
 (0)