Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7294#discussion_r34624184
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/RandomForestClassifier.scala
 ---
    @@ -93,9 +93,12 @@ final class RandomForestClassifier(override val uid: 
String)
         val oldDataset: RDD[LabeledPoint] = extractLabeledPoints(dataset)
         val strategy =
           super.getOldStrategy(categoricalFeatures, numClasses, 
OldAlgo.Classification, getOldImpurity)
    -    val oldModel = OldRandomForest.trainClassifier(
    -      oldDataset, strategy, getNumTrees, getFeatureSubsetStrategy, 
getSeed.toInt)
    -    RandomForestClassificationModel.fromOld(oldModel, this, 
categoricalFeatures)
    +    // val oldModel = OldRandomForest.trainClassifier(
    +    //   oldDataset, strategy, getNumTrees, getFeatureSubsetStrategy, 
getSeed.toInt)
    +    // RandomForestClassificationModel.fromOld(oldModel, this, 
categoricalFeatures)
    +    val trees = RandomForest.run(oldDataset, strategy, getNumTrees, 
getFeatureSubsetStrategy,
    +      getSeed).map(_.asInstanceOf[DecisionTreeClassificationModel])
    --- End diff --
    
    move `.map` to a new line, e.g.:
    
    ~~~scala
    val trees = RandomForest.run(
        oldDataset, strategy, getNumTrees, getFeatureSubsetStrategy, getSeed)
      .map(_.asInstanceOf[DecisionTreeClassificationModel])
    ~~~


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to