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

ENH: new function zip_sp_matmul_topn can zip matrices zip_j A.dot(B_j) #101

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

mbaak
Copy link
Collaborator

@mbaak mbaak commented Feb 29, 2024

ENH: new function zip_sp_matmul_topn that can zip matrices zip_j A.dot(B_j)

Function will return a zipped matrix Z in CSR format, zip_j C_j, where Z = [sorted top n results > lower_bound for each row of C_j], where C_j = A.dot(B_j) and where B has been split row-wise into sub-matrices B_j.

Function only allows for sorted variant of sp_matzip function; unsorted variant (sorted based on insertion order) cannot be (made) equal to unsorted function on full matrices. zip_sp_matmul_topn by default sorts by value.

And added python function to zip split matrices.
Plus added two unit tests to test functionality.

NB Skip unit test test_stack_zip_sp_matmul_topn for python 3.8 due to bug in scipy vstack function, it does not support all data types.

Bump version to 1.1.0

pyproject.toml Outdated Show resolved Hide resolved
@RUrlus
Copy link
Collaborator

RUrlus commented Feb 29, 2024

Otherwise looks good Max, thanks!

…t(B_j)

Function will return a zipped matrix Z in CSR format, zip_j C_j, where
Z = [sorted top n results > lower_bound for each row of C_j], where C_j = A.dot(B_j)
and where B has been split row-wise into sub-matrices B_j.

Function only allows for sorted variant of sp_matzip function;
unsorted variant (sorted based on insertion order) cannot be (made) equal to unsorted function on full matrices.
zip_sp_matmul_topn by default sorts by value.

And added python function to zip split matrices.
Plus added two unit tests to test functionality.

NB Skip unit test test_stack_zip_sp_matmul_topn for python 3.8 due to bug in scipy vstack function,
it does not support all data types.
@RUrlus
Copy link
Collaborator

RUrlus commented Mar 1, 2024

Ha Max, can you add the change to the change log as well?
Picked this up

@RUrlus RUrlus enabled auto-merge (rebase) March 1, 2024 10:07
@RUrlus RUrlus merged commit 613ff2c into ing-bank:master Mar 1, 2024
32 checks passed
@RUrlus RUrlus deleted the zipper branch March 1, 2024 10:17
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