From 987cbf4b177f29e232bf2ba2ca595ea7015694da Mon Sep 17 00:00:00 2001 From: "qiping.lqp" Date: Tue, 9 Sep 2014 12:30:01 +0800 Subject: [PATCH] fix bug --- .../main/scala/org/apache/spark/mllib/tree/DecisionTree.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala b/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala index eb491b2dbd101..499fa2dff7be6 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala @@ -145,7 +145,7 @@ class DecisionTree (private val strategy: Strategy) extends Serializable with Lo val stats = nodeSplitStats._2 val predict = nodeSplitStats._3 val isLeaf = (stats.gain <= 0) || (level == strategy.maxDepth) - val node = new Node(nodeIndex, predict, isLeaf, Some(split), None, None, Some(stats)) + val node = new Node(nodeIndex, predict.predict, isLeaf, Some(split), None, None, Some(stats)) logDebug("Node = " + node) nodes(nodeIndex) = node timer.stop("extractNodeInfo")