Github user jkbradley commented on the pull request:

    https://github.com/apache/spark/pull/12663#issuecomment-214897174
  
    This PR makes the behavior of trees and ensembles consistent with others, 
such as NaiveBayes.  I think it's a pretty common ML use case to have labels 
already indexed from 0, at least in canned ML datasets.
    
    StringIndexer could also behave differently in rarer situations.  If 
classes 0,...,numClasses-1 were present in the labels except for some 
intermediate class i, then StringIndexer would re-index the classes, whereas 
this would not.
    
    An alternative would be to force users to specify numClasses, but that 
seems unnecessary to me.


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