The process is simple here: embed heroes just like words, but pick a hidden dimension of size 2. We could pick a larger number of latent dimensions for other tasks, but my goal was to quickly visualize the heroes in 2 dimensions. An alternative strategy would be to embed heroes in > 2 dimensions and then use a t-SNE for dimensionality reduction.
Also for simplicity I embed from the Radiant perspective, so if you embed dire heroes you might get slightly different results. I ignore order pick order effects, which could also add interesting complexity.
Python 3
- pytorch
- requests
- numpy
- pandas
R
- ggplot / tidyverse
- ggrepel
- Make sure your paths are right. Either naviagte to the
dota_embeddings
folder or change paths to be absolute. - Run
crawl.py
for awhile or click the download link above - Run
embed.py
- Open up R and visualize using
visualize.R