Skip to content

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

Merged
RUrlus merged 4 commits intoing-bank:masterfrom
RUrlus:zipper
Mar 1, 2024
Merged

ENH: new function zip_sp_matmul_topn can zip matrices zip_j A.dot(B_j)#101
RUrlus merged 4 commits intoing-bank:masterfrom
RUrlus:zipper

Conversation

@mbaak
Copy link
Copy Markdown
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

Comment thread pyproject.toml Outdated
@RUrlus
Copy link
Copy Markdown
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
Copy Markdown
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
@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