-
Notifications
You must be signed in to change notification settings - Fork 550
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
[REVIEW] Fixing support for empty rows in sparse Jaccard / Cosine #3612
[REVIEW] Fixing support for empty rows in sparse Jaccard / Cosine #3612
Conversation
Tagging @lowener for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #3612 +/- ##
===============================================
- Coverage 80.70% 80.59% -0.12%
===============================================
Files 227 227
Lines 17615 17847 +232
===============================================
+ Hits 14217 14384 +167
- Misses 3398 3463 +65
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
value_t cos = ((norms != 0) * dot) / ((norms == 0) + norms); | ||
|
||
// flip the similarity when both rows are 0 | ||
bool both_empty = q_norm == 0 && r_norm == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I'd probably put parens around the == conditions for clarity
@gpucibot merge |
Closes #3610