GitHub user jkbradley opened a pull request:
https://github.com/apache/spark/pull/8187
[SPARK-9956] [ML] Make trees work with one-category features
This modifies DecisionTreeMetadata construction to treat 1-category
features as continuous, so that trees do not fail with such features. It is
important for the pipelines API, where VectorIndexer can automatically
categorize certain features as categorical.
As stated in the JIRA, this is a temp fix which we can improve upon later
by automatically filtering out those features. That will take longer, though,
since it will require careful indexing.
Targeted for 1.5 and master
CC: @manishamde @mengxr @yanboliang
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jkbradley/spark tree-1cat
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/8187.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #8187
----
commit df0ebb79b2903dcb9e49c89d4c9e26970aa0df97
Author: Joseph K. Bradley <[email protected]>
Date: 2015-08-14T00:58:44Z
modified ML trees to work when given 1-category feature
----
---
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]