Glossary term
Glossary term
Foundations
In machine learning, a mechanism for bucketing categorical data, particularly when the number of categories is large, but the number of categories actually appearing in the dataset is comparatively small.
For example, Earth is home to about 73,000 tree species. You could represent each of the 73,000 tree species in 73,000 separate categorical buckets. Alternatively, if only 200 of those tree species actually appear in a dataset, you could use hashing to divide tree species into perhaps 500 buckets.
A single bucket could contain multiple tree species. For example, hashing could place baobab and red maple—two genetically dissimilar species—into the same bucket. Regardless, hashing is still a good way to map large categorical sets into the selected number of buckets. Hashing turns a categorical feature having a large number of possible values into a much smaller number of values by grouping values in a deterministic way.
See Categorical data: Vocabulary and one-hot encoding in Machine Learning Crash Course for more information.
For example, Earth is home to about 73,000 tree species. You could represent each of the 73,000 tree species in 73,000 separate categorical buckets. Alternatively, if only 200 of those tree species actually appear in a dataset, you could use hashing to divide tree species into perhaps 500 buckets.
Created for this library
An ML platform team uses feature hashing to handle large-cardinality categorical features without storing a vocabulary the size of the universe.
A search-quality team uses locality-sensitive hashing on document embeddings to retrieve near-duplicates from a large index quickly.
An ad-tech team uses hashing on advertiser IDs to keep the feature dimension fixed even as the number of advertisers grows.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License