Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-13964 Feature hashing improvements
  3. SPARK-13969

Extend input format that feature hashing can handle

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.0
    • ML, MLlib
    • None

    Description

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

      Attachments

        Issue Links

          Activity

            People

              mlnick Nicholas Pentreath
              mlnick Nicholas Pentreath
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: