Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add laser clustering example. #275

Merged
merged 7 commits into from
Dec 7, 2023

Conversation

Paulooh007
Copy link
Contributor

A tutorial notebook that demonstrates multilingual embedding clustering.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 1, 2023

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Paulooh007/LASER/blob/laser-clustering/tasks/clustering/LaserClusteringExample.ipynb)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from opening the notebook in Colab and running all the cells, the user might want just to take a look at the resulting notebook.

I can open one in https://github.com/Paulooh007/LASER/blob/laser-clustering/tasks/clustering/LaserClusteringExample.ipynb and it looks good, but it has no images.

Can you embed the images directly into the notebook? I do not know if plotly can do so, but matplotlib surely can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to fix this in my recent commit by using fig.show("png"), so it renders well on GitHub. Additionally, I added comments in case the user wants to enable interactive plots, where they can hover over the points to see more details.

@heffernankevin
Copy link
Contributor

This is really nice! A small nit: at the end you're plotting a random selected cluster, but it looks like you're adding a label "trace 10" under the "Languages" legend, and the title is "Cluster 2". Maybe something simple to try is changing the title to: "Sentences in Cluster 2 (highlighted in green)" and remove "trace 10" from the legend.

@Paulooh007
Copy link
Contributor Author

This is really nice! A small nit: at the end you're plotting a random selected cluster, but it looks like you're adding a label "trace 10" under the "Languages" legend, and the title is "Cluster 2". Maybe something simple to try is changing the title to: "Sentences in Cluster 2 (highlighted in green)" and remove "trace 10" from the legend.

Hi @heffernankevin ,
I couldn't remove the trace without removing the whole legend, So I renamed it to "Selected Cluster". Not sure if that's ok.
I've also renamed the title. Let me know what you think.

@heffernankevin heffernankevin merged commit 3b255b3 into facebookresearch:main Dec 7, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants