You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jkbradley <gi...@git.apache.org> on 2016/01/04 20:50:38 UTC

[GitHub] spark pull request: [SPARK-9622] [ML] DecisionTreeRegressor: provi...

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

    https://github.com/apache/spark/pull/8866#discussion_r48772445
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/regression/DecisionTreeRegressor.scala ---
    @@ -129,6 +136,22 @@ final class DecisionTreeRegressionModel private[ml] (
         rootNode.predictImpl(features).prediction
       }
     
    +  /** We need to update this function if we ever add other impurity measures. */
    +  protected def predictVariance(features: Vector): Double = {
    +    rootNode.predictImpl(features).impurityStats.calculate()
    +  }
    +
    +  override protected def transformImpl(dataset: DataFrame): DataFrame = {
    --- End diff --
    
    OK thanks.  I agree it's probably best not to warn users if they have explicitly turned off that column.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org