[ 
https://issues.apache.org/jira/browse/SPARK-58710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-58710:
-----------------------------------
    Labels: pull-request-available  (was: )

> Remove unused members from the decision tree Node classes
> ---------------------------------------------------------
>
>                 Key: SPARK-58710
>                 URL: https://issues.apache.org/jira/browse/SPARK-58710
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>    Affects Versions: 4.3.0
>            Reporter: Uroš Bojanić
>            Priority: Major
>              Labels: pull-request-available
>
> The decision tree Node classes carry members with no callers.
> In mllib/tree/model/Node.scala: deepCopy (which only ever calls itself 
> recursively), and the companion helpers isLeftChild, maxNodesInLevel, 
> startIndexInLevel, emptyNode, parentIndex, getNode and indexToLevel.
> In ml/tree/Node.scala, whose comment notes the indexing methods were copied 
> from the mllib class: the deepCopy declaration and its two overrides, plus 
> parentIndex, isLeftChild, maxNodesInLevel, startIndexInLevel and getNode.
> The live members are kept: apply, leftChildIndex and rightChildIndex in both 
> objects, and emptyNode and indexToLevel in LearningNode, which RandomForest 
> still calls. The last callers of the removed helpers disappeared when the 
> decision tree implementation moved from spark.mllib to spark.ml.
> Nothing here is public API: the mllib companion is private[spark] and 
> deepCopy is private[tree], so there is no binary compatibility impact and no 
> MimaExcludes entry is needed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to