Skip to content

Commit

Permalink
minor code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manishamde committed May 12, 2014
1 parent e547151 commit 75f2bfc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ object DecisionTree extends Serializable with Logging {
*/
def train(input: RDD[LabeledPoint], strategy: Strategy): DecisionTreeModel = {
// Converting from standard instance format to weighted input format for tree training
val weightedInput = input.map(x => WeightedLabeledPoint(x.label,x.features))
val weightedInput = input.map(x => WeightedLabeledPoint(x.label, x.features))
new DecisionTree(strategy).train(weightedInput: RDD[WeightedLabeledPoint])
}

Expand All @@ -238,7 +238,7 @@ object DecisionTree extends Serializable with Logging {
maxDepth: Int): DecisionTreeModel = {
val strategy = new Strategy(algo,impurity,maxDepth)
// Converting from standard instance format to weighted input format for tree training
val weightedInput = input.map(x => WeightedLabeledPoint(x.label,x.features))
val weightedInput = input.map(x => WeightedLabeledPoint(x.label, x.features))
new DecisionTree(strategy).train(weightedInput: RDD[WeightedLabeledPoint])
}

Expand Down Expand Up @@ -278,7 +278,7 @@ object DecisionTree extends Serializable with Logging {
val strategy = new Strategy(algo, impurity, maxDepth, maxBins, quantileCalculationStrategy,
categoricalFeaturesInfo)
// Converting from standard instance format to weighted input format for tree training
val weightedInput = input.map(x => WeightedLabeledPoint(x.label,x.features))
val weightedInput = input.map(x => WeightedLabeledPoint(x.label, x.features))
new DecisionTree(strategy).train(weightedInput: RDD[WeightedLabeledPoint])
}

Expand Down

0 comments on commit 75f2bfc

Please sign in to comment.