Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Regarding the situation where positive samples in a batch_size are treated as negative samples. #216

Open
YanziWang-dot opened this issue Mar 4, 2023 · 1 comment

Comments

@YanziWang-dot
Copy link

YanziWang-dot commented Mar 4, 2023

No description provided.

@sagi-ezri
Copy link

Yes, you can set a threshold for cosine similarity to classify samples as positive or negative. The threshold serves as a decision boundary that separates similar samples from dissimilar ones. To do this, you would compute the cosine similarity between the query sample and each sample in the batch and compare the similarity scores to the threshold. However, choosing the right threshold can be tricky and depends on the specific problem and dataset, hence it's important to choose the threshold carefully and to evaluate its performance using metrics such as precision, recall, and F1 score.

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

No branches or pull requests

2 participants