Github user sethah commented on the issue:

    https://github.com/apache/spark/pull/18832
  
    I don't agree the comment is _misleading_. It might be confusing, but 
that's something different.
    
    The reason that the `DTStatsAggregator` needs to keep track of 
`parentStats` is so that we can get an `ImpurityCalculator` for the parent node 
when we are finding best splits. However, an `ImpurityCalculator` for the 
parent node already exists via `node.stats.impurityCalculator` on every 
iteration except the first. It is precisely this reason that we had to add 
`parentStats` at all. It's unnecessary otherwise.
    
    If you want to change it, then something like "Parent stats need to be 
explicitly tracked in the `DTStatsAggregator` because the parent [[Node]] 
object does not have `ImpurityStats` on the first iteration."
    
    I doubt that's much clearer. Just to note, this comment was intended for 
developers anyway, since it's all private APIs.


---
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