2
$\begingroup$

I've been interested in feature hashing in machine learning (the hashing trick) I can't seem to find worked examples of it being used in action for an actual algorithm. Can anyone provide an example of how it would be used from the idea behind the hashing all the way to it's implementation in an algorithm? I've seen resources on line explaining what feature hashing is but non really provide clear examples and show how they're fed into an algorithm. Does anyone know of any good resources explaining it? Any help is greatly appreciated !!

$\endgroup$
1
$\begingroup$

Scikit-learn provides a small example in its documentation. There is also a link to less trivial example on this page.

Another example: this notebook from Databricks Scalable Machine Learning course.

$\endgroup$
1
$\begingroup$

Generally, feature hashing is used to convert categorical feature into a small-dimension feature space and take these feature as input to the algorithm. You can look at the code for feature hashing separately from the algorithm part of the code. KDnuggets has a post giving pseudo code about feature hashing https://www.kdnuggets.com/2016/01/useful-data-science-feature-hashing.html.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.