Skip to content
Next Next commit
Added DecisionTree static train() methods API to match Python, but wi…
…thout default parameters
  • Loading branch information
jkbradley committed Aug 5, 2014
commit eaf84c0cdcf2eee5c00addbc4c73d24aa90e68b8
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,30 @@ object DecisionTree extends Serializable with Logging {
new DecisionTree(strategy).train(input)
}

def train(
input: RDD[LabeledPoint],
algo: Algo,
numClassesForClassification: Int,
categoricalFeaturesInfo: Map[Int,Int],
impurity: Impurity,
maxDepth: Int,
maxBins: Int): DecisionTreeModel = ???

def trainClassifier(
input: RDD[LabeledPoint],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDD -> JavaRDD. Sorry I missed this in the first pass.

numClassesForClassification: Int,
categoricalFeaturesInfo: Map[Int,Int],
impurity: Impurity,
maxDepth: Int,
maxBins: Int): DecisionTreeModel = ???

def trainRegressor(
input: RDD[LabeledPoint],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto: RDD -> JavaRDD.

categoricalFeaturesInfo: Map[Int,Int],
impurity: Impurity,
maxDepth: Int,
maxBins: Int): DecisionTreeModel = ???

private val InvalidBinIndex = -1

/**
Expand Down