You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Joseph K. Bradley (JIRA)" <ji...@apache.org> on 2017/03/08 04:04:38 UTC
[jira] [Commented] (SPARK-13969) Extend input format that feature
hashing can handle
[ https://issues.apache.org/jira/browse/SPARK-13969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900662#comment-15900662 ]
Joseph K. Bradley commented on SPARK-13969:
-------------------------------------------
Noticing this JIRA again. I feel like this is partly solved:
* HashingTF can handle pretty much arbitrary types.
* HashingTF should have identical behavior across languages and JVM versions. (These first 2 are because HashingTF converts the input to StringType and then hashes it using MurmurHash3.)
with 1 remaining item:
* HashingTF does not take multiple input columns. That would effectively make it handle VectorAssembler's job as well.
What are your thoughts here? Should we just stick with VectorAssembler?
> Extend input format that feature hashing can handle
> ---------------------------------------------------
>
> Key: SPARK-13969
> URL: https://issues.apache.org/jira/browse/SPARK-13969
> Project: Spark
> Issue Type: Sub-task
> Components: ML, MLlib
> Reporter: Nick Pentreath
> Priority: Minor
>
> Currently {{HashingTF}} works like {{CountVectorizer}} (the equivalent in scikit-learn is {{HashingVectorizer}}). That is, it works on a sequence of strings and computes term frequencies.
> The use cases for feature hashing extend to arbitrary feature values (binary, count or real-valued). For example, scikit-learn's {{FeatureHasher}} can accept a sequence of (feature_name, value) pairs (e.g. a map, list). In this way, feature hashing can operate as both "one-hot encoder" and "vector assembler" at the same time.
> Investigate adding a more generic feature hasher (that in turn can be used by {{HashingTF}}).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org