Github user actuaryzhang commented on the issue:
https://github.com/apache/spark/pull/17967
Questions I have:
1. StringIndexer and RFormula use repetitive code for defining
`stringOrderType`. Should this be moved to a trait?
2. When setting `stringOrderType = "alphabetAsc"`, RFormula will drop the
same category as R. This makes sure Spark will produce the same model as base
R. However, the ordering of the columns are still different. In the above
example, R columns correspond to `("bar", "aaz")`, while RFormula columns
correspond to `("aaz", "bar")`. Are we OK with this? It seems that to make 100%
alignment with base R, we need `stringOrderType = "alphabetDsc"` in
StringIndexer, and an option for `dropFirst` in OneHotEncoder. IMO, as long as
RFormula and R drop the same category, we are fine.
---
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]