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

How to get sim_pos and sim_neg? #2

Open
CharlesChen24 opened this issue Sep 20, 2023 · 2 comments
Open

How to get sim_pos and sim_neg? #2

CharlesChen24 opened this issue Sep 20, 2023 · 2 comments

Comments

@CharlesChen24
Copy link

CharlesChen24 commented Sep 20, 2023

How to calculate sim_pos and sim_neg based on the feature embeddings output by the model and their labels?
What are the shapes of sim_pos and sim_neg?
Do they need L2 normalization?

@CharlesChen24 CharlesChen24 changed the title How do you get sim_pos and sim_neg? How to get sim_pos and sim_neg? Sep 20, 2023
@shuaitang
Copy link
Collaborator

the paper https://arxiv.org/pdf/1611.00822.pdf used cosine similarity to calculate the pair-wise similarity score. Bounded similarity scores tend to work better imo.

@CharlesChen24
Copy link
Author

the paper https://arxiv.org/pdf/1611.00822.pdf used cosine similarity to calculate the pair-wise similarity score. Bounded similarity scores tend to work better imo.

so sim_pos represents the similarity score of positive pairs? The similarity score of positive pairs is the dot product of the feature embeddings of two samples with the same label?sim_neg (the similarity score of negative pairs) can be get in the same way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants