Skip to content

add option to randomly sample negative pairs#56

Open
jessica-ewald wants to merge 2 commits intocytomining:mainfrom
jessica-ewald:sample
Open

add option to randomly sample negative pairs#56
jessica-ewald wants to merge 2 commits intocytomining:mainfrom
jessica-ewald:sample

Conversation

@jessica-ewald
Copy link
Copy Markdown
Contributor

Add an optional parameter to the "average_precision" function called "sample_neg" that enables random sampling of the negative pairs prior to pairwise cosine distance calculation.

If "sample_neg" is between 0 and 1, sampling is done by percentage (ie. sample_neg = 0.2, then 20% of neg_pairs are sampled).

If "sample_neg" is greater than 1, sampling is done by size (ie. sample_neg = 10 000, then 10 000 neg_pairs are sampled).

The default value for "sample_neg" is 1 - in this case, no sampling is performed.

@johnarevalo johnarevalo self-requested a review February 6, 2024 17:04
@shntnu
Copy link
Copy Markdown
Member

shntnu commented Sep 30, 2024

@alxndrkalinin and I discussed this today; Alex will update with his notes.

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.

2 participants