Github user MLnick commented on the pull request:
https://github.com/apache/spark/pull/1671#issuecomment-51380681
True, for text feature extraction counts you'd want only positive values
(scikit-learn has a non-negative flag:
http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.FeatureHasher.html#sklearn.feature_extraction.FeatureHasher)
Not suggesting any change of `HashingTF` now - just considering the more
general use cases this opens up (ie VW-style hashing, including namespaces etc).
This can be revisited perhaps for 1.2+ - the default could be as is
(non-negative features), with an option to use the signed approach. `HashingTF`
then becomes a more general-use feature hasher (name could change, or depending
on how `HashingTF` evolves it could become a `HashingVectorizer`-like thing)
---
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]