WeichenXu123 opened a new pull request, #55758:
URL: https://github.com/apache/spark/pull/55758

   ### What changes were proposed in this pull request?
   This PR adds a parameter to enable/disable a featuer where LearningNodes are 
merged after a RF model is trained.
   
   This PR takes over https://github.com/apache/spark/pull/32813
   
   ### Why are the changes needed?
   2 Reasons:
   
   1. In addition to basic classification, another use case for decision trees 
are the probabilities associated with predictions.
    Once pruned, these predictions are lost and it makes the trees/predictions 
challenging to work with if not unusable.
   
   2. It is not in line with the default behavior in sklearn.  In sklearn, the 
trees are left unpruned by default.
   
   Please see Jira ticket for more explanation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   **New params:**
   adds a parameter `pruneTree` that is exposed to the Tree based classifiers.  
Will add tests here to ensure parameter is exposed correctly.
   
   ### How was this patch tested?
   Unit tests.
   
   Lead-authored-by: WeichenXu <[email protected]>
   Co-authored-by: bribiescas-carlos <[email protected]>
   Co-authored-by: Carlos Bribiescas <[email protected]>
   Signed-off-by: Weichen Xu <[email protected]>
   
   
   (cherry picked from commit 1f4650674a663627cdf38a6100d9fb7cf1527c47)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to