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

    https://github.com/apache/spark/pull/19433#discussion_r151011879
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/model/InformationGainStats.scala
 ---
    @@ -112,7 +113,7 @@ private[spark] object ImpurityStats {
        * minimum number of instances per node.
        */
       def getInvalidImpurityStats(impurityCalculator: ImpurityCalculator): 
ImpurityStats = {
    -    new ImpurityStats(Double.MinValue, impurityCalculator.calculate(),
    +    new ImpurityStats(Double.MinValue, impurity = -1,
    --- End diff --
    
    I changed this to be -1 here since node impurity would eventually get set 
to -1 anyways when `LearningNodes` with invalid `ImpurityStats` were converted 
into decision tree leaf nodes (see 
[`LearningNode.toNode`](https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/tree/Node.scala#L279))


---

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

Reply via email to