From d542bb009251786706720bd2e22dfaf6796b566d Mon Sep 17 00:00:00 2001 From: MechCoder Date: Mon, 13 Apr 2015 08:54:43 +0530 Subject: [PATCH] Remove unused imports and docs --- .../spark/mllib/tree/model/treeEnsembleModels.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/tree/model/treeEnsembleModels.scala b/mllib/src/main/scala/org/apache/spark/mllib/tree/model/treeEnsembleModels.scala index 80ab93174f77b..ea966717b58b6 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/tree/model/treeEnsembleModels.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/tree/model/treeEnsembleModels.scala @@ -27,7 +27,6 @@ import org.json4s.jackson.JsonMethods._ import org.apache.spark.{Logging, SparkContext} import org.apache.spark.annotation.Experimental import org.apache.spark.api.java.JavaRDD -import org.apache.spark.broadcast.Broadcast import org.apache.spark.mllib.linalg.Vector import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.mllib.tree.configuration.Algo @@ -137,7 +136,7 @@ class GradientBoostedTreesModel( evaluationArray(0) = predictionAndError.values.mean() - (1 until numIterations).map { nTree => + (1 until numIterations).foreach { nTree => predictionAndError = GradientBoostedTreesModel.updatePredictionError( remappedData, predictionAndError, treeWeights(nTree), trees(nTree), loss) evaluationArray(nTree) = predictionAndError.values.mean() @@ -153,7 +152,7 @@ object GradientBoostedTreesModel extends Loader[GradientBoostedTreesModel] { /** * Compute the initial predictions and errors for a dataset for the first * iteration of gradient boosting. - * @param Training data. + * @param data: training data. * @param initTreeWeight: learning rate assigned to the first tree. * @param initTree: first DecisionTreeModel. * @param loss: evaluation metric. @@ -175,9 +174,8 @@ object GradientBoostedTreesModel extends Loader[GradientBoostedTreesModel] { /** * Update a zipped predictionError RDD * (as obtained with computeInitialPredictionAndError) - * @param training data. + * @param data: training data. * @param predictionAndError: predictionError RDD - * @param nTree: tree index. * @param treeWeight: Learning rate. * @param tree: Tree using which the prediction and error should be updated. * @param loss: evaluation metric.