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 new item similarity metrics for SAR #1754

Merged
merged 13 commits into from Jul 7, 2022

Conversation

simonzhaoms
Copy link
Contributor

Description

This PR adds 4 new item similarity metrics for SAR:

  • Mutual information: $s_{ij} = \log_2\frac{nc_{ij}}{c_{ii}c_{jj}}$
  • Lexicographers mutual information: $s_{ij} = c_{ij}\log_2\frac{nc_{ij}}{c_{ii}c_{jj}}$
  • Cosine similarity: $s_{ij} = \frac{c_{ij}}{\sqrt{c_{ii}c_{jj}}}$
  • Inclusion index: $s_{ij} = \frac{c_{ij}}{\min (c_{ii}, c_{jj})}$

Related Issues

Checklist:

  • I have followed the contribution guidelines and code style for this project.
  • I have added tests covering my contributions.
  • I have updated the documentation accordingly.
  • This PR is being made to staging branch and not to main branch.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@miguelgfierro
Copy link
Collaborator

Something to consider @simonzhaoms is a metric called Earth Mover's Distance I have used that in the past and worked well for me. It was for comparing feature vectors and I was using a large number of distances: euclidean, KL, Jasen-Shannon, and others. And I remember that this one got really good results. Not sure if it could be applicable in the SAR scenario

@simonzhaoms simonzhaoms marked this pull request as ready for review July 6, 2022 03:51
Copy link
Collaborator

@miguelgfierro miguelgfierro left a comment

Choose a reason for hiding this comment

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

This is really good and interesting work Simon

@simonzhaoms simonzhaoms merged commit 1d7341e into staging Jul 7, 2022
@simonzhaoms simonzhaoms deleted the simonz/202206141347/sar-new-sim-metrics branch July 7, 2022 08:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants