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 sparse matrix normalization routines + sparse util tests #401

Merged
merged 8 commits into from
May 27, 2024

Conversation

mdekstrand
Copy link
Member

This makes a few sequenced changes to improve sparse matrix utilities and testing:

  1. Add a sparse_tensors Hypothesis generator to lenskit.util.test.
  2. Add tests for sparse_row_stats.
  3. Add normalize_sparse_rows function to normalize rows of a CSR matrix, with tests.
  4. Use normalize_sparse_rows in item KNN.

@mdekstrand mdekstrand added the internals Internal infrastructure (parallelism, math, etc.) label May 27, 2024
@mdekstrand mdekstrand added this to the 2024.1 milestone May 27, 2024
@mdekstrand mdekstrand self-assigned this May 27, 2024
Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 91.22807% with 5 lines in your changes missing coverage. Please review.

Project coverage is 91.58%. Comparing base (2ed8cd5) to head (ffef967).
Report is 821 commits behind head on main.

Files Patch % Lines
lenskit/util/test.py 88.88% 3 Missing ⚠️
lenskit/data/matrix.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #401      +/-   ##
==========================================
- Coverage   91.64%   91.58%   -0.07%     
==========================================
  Files          48       48              
  Lines        3063     3100      +37     
==========================================
+ Hits         2807     2839      +32     
- Misses        256      261       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mdekstrand mdekstrand merged commit ffef967 into lenskit:main May 27, 2024
17 of 19 checks passed
@mdekstrand mdekstrand deleted the fix/sparse-tests branch May 27, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Internal infrastructure (parallelism, math, etc.)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant