Skip to content

Commit

Permalink
minor: some docs
Browse files Browse the repository at this point in the history
Signed-off-by: Manish Amde <[email protected]>
  • Loading branch information
manishamde committed Feb 28, 2014
1 parent 0dd7659 commit dd0c0d7
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ import org.apache.spark.mllib.tree.configuration.QuantileStrategy._
import org.apache.spark.mllib.tree.configuration.FeatureType._
import org.apache.spark.mllib.tree.configuration.Algo._

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

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

//Cache input RDD for speedup during multiple passes
Expand Down

0 comments on commit dd0c0d7

Please sign in to comment.