| embedding_size | R Documentation |
These functions returns proposed embedding sizes for each categorical feature. They are "rule of thumbs", so the are based on empirical rather than theoretical conclusions, and their parameters can look like "magic numbers". Nevertheless, when you don't know what embedding size will be "optimal", it's good to start with such kind of general rules.
google Proposed on the Google Developer site
x^0.25
fastai
1.6 * x^0.56
embedding_size_google(x, max_size = 100) embedding_size_fastai(x, max_size = 100)
x |
( |
Proposed embedding sizes.
dict_sizes <- dict_size(tiny_m5) embedding_size_google(dict_sizes) embedding_size_fastai(dict_sizes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.