Would you mind open-sourcing the code drawn by Figure 6?
Closed this issue · 4 comments
zhiweihu1103 commented
Would you mind open-sourcing the code drawn by Figure 6?
CheaSim commented
We mainly use the function from seaborn
.
ax = sns.jointplot(data=df,x='x',y='y', hue="id", legend=True)
We use t-sne to make dimensionality reduction on the entity embedding with 768-d to 2-d.
You can get the nearest neighbor entities from the knowledge store. And calculate the distance to draw the circle.
zhiweihu1103 commented
Would you mind giving a piece of code that works? Data can be filled at will.
CheaSim commented
import seaborn as sns
import pandas as pd
df = pd.read_csv("tsne.csv")
sns.set_style("white")
sns.set_theme(font='Courier New')
# p = sns.color_palette("Paired", as_cmap=True)
p = sns.color_palette("Set2",20, as_cmap=True)
sns.set_palette("Paired")
ax = sns.jointplot(data=df,x='x',y='y', hue="name", legend=True)
ax.ax_joint.legend(bbox_to_anchor=(1.23, 0.5),loc="center left", borderaxespad=0.)
tsne.csv
You can run this code to get the pic and draw the circle as you wish.
And it may diff from the paper as we select fewer entities in this process.
zhiweihu1103 commented
Thx. I will try. Good luck with you.