Last active
October 3, 2022 18:00
-
-
Save andrea-dagostino/f84e15b092ff2f8bebc023a02694d4d6 to your computer and use it in GitHub Desktop.
text_sim_tfidf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
top = similarity_df[similarity_df > 0.4] # andiamo a modificare qui | |
mask = np.triu(np.ones_like(top)) | |
sns.heatmap( | |
top, | |
square=True, | |
annot=True, | |
robust=True, | |
fmt='.2f', | |
annot_kws={'size': 7, 'fontweight': 'bold'}, | |
yticklabels=top.columns | |
xticklabels=top.columns, | |
cmap="YlGnBu", | |
mask=mask | |
) | |
plt.title('Heatmap delle similarità tra testi', fontdict={'fontsize': 24}) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment