Skip to content

Commit eaa1dcf

Browse files
committed
Added topNode doc in DecisionTree and scalastyle fix
1 parent d4d7864 commit eaa1dcf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ object DecisionTree extends Serializable with Logging {
359359
* @param input Training data: RDD of [[org.apache.spark.mllib.tree.impl.TreePoint]]
360360
* @param metadata Learning and dataset metadata
361361
* @param level Level of the tree
362+
* @param topNode Root node of the tree (or invalid node when training first level).
362363
* @param splits possible splits for all features, indexed (numFeatures)(numSplits)
363364
* @param bins possible bins for all features, indexed (numFeatures)(numBins)
364365
* @param maxLevelForSingleGroup the deepest level for single-group level-wise computation.

mllib/src/test/scala/org/apache/spark/mllib/tree/DecisionTreeSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ class DecisionTreeSuite extends FunSuite with LocalSparkContext {
270270
assert(bins(0).length === 0)
271271

272272
val treeInput = TreePoint.convertToTreeRDD(rdd, bins, metadata)
273-
val (rootNode: Node, doneTraining: Boolean) = DecisionTree.findBestSplits(treeInput, metadata, 0,
274-
null, splits, bins, 10)
273+
val (rootNode: Node, doneTraining: Boolean) =
274+
DecisionTree.findBestSplits(treeInput, metadata, 0, null, splits, bins, 10)
275275

276276
val split = rootNode.split.get
277277
assert(split.categories === List(1.0))

0 commit comments

Comments
 (0)