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

About generating all possible triplets using combinations() function #73

Open
sandipan211 opened this issue Jun 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@sandipan211
Copy link

Hi,
I am using your code to generate all possible triplet pairs. I see you are using combinations() functions to generate anchor positive pairs. Shouldn't you generate these pairs using permutations()? Example : if I have two labels - label A having embeddings at indices 0, 2 and label B having embeddings at indices 1, 3.

Using your code I am getting <anchor, positive, negative> triplets as: <0,2,1>, <0,2,3>, <1,3,0>, <1,3,2>.

However, using this I am not getting triplets <2,0,1>, <2,0,3>...., etc. using combinations() as written in your code. These will be different from <0,2,1> and <0,2,3> right?

Kindly help me out in understanding why you used combinations() function and claiming that you have got all anchor-positive pairs? If you have read about this from a paper, kindly cite it for me. It's quite urgent. Looking forward to your reply. Thank you.

@adambielski
Copy link
Owner

@sandipan211 I think you are correct, combinations is not generating all possible triplets, so that's a bug that I missed. Looks like using permutations fixes it. Good catch!

@adambielski adambielski added the bug Something isn't working label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants