File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
mllib/src/test/scala/org/apache/spark/mllib/tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -722,7 +722,7 @@ class DecisionTreeSuite extends FunSuite with LocalSparkContext {
722722 val treeInput = TreePoint .convertToTreeRDD(input, bins, metadata)
723723 val baggedInput = BaggedPoint .convertToBaggedRDDWithoutSampling(treeInput)
724724
725- val topNode = Node .emptyNode(nodeIndex = 0 )
725+ val topNode = Node .emptyNode(nodeIndex = 1 )
726726 assert(topNode.predict.predict === Double .MinValue )
727727 assert(topNode.impurity === - 1.0 )
728728 assert(topNode.isLeaf === false )
@@ -745,6 +745,8 @@ class DecisionTreeSuite extends FunSuite with LocalSparkContext {
745745 // set impurity and predict for child nodes
746746 assert(topNode.leftNode.get.predict.predict === 0.0 )
747747 assert(topNode.rightNode.get.predict.predict === 1.0 )
748+ assert(topNode.leftNode.get.impurity === 0.0 )
749+ assert(topNode.rightNode.get.impurity === 0.0 )
748750 }
749751}
750752
You can’t perform that action at this time.
0 commit comments