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

Optimize recommend() with bulk prediction #64

Merged
merged 10 commits into from
Nov 22, 2022
Merged

Optimize recommend() with bulk prediction #64

merged 10 commits into from
Nov 22, 2022

Conversation

takuti
Copy link
Owner

@takuti takuti commented Nov 20, 2022

In particular, accelerate calculating matrix factorization-based recommendation scores by pre-computing (caching) an approximated user-item matrix.

by pre-computing an approximated user-item matrix
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2022

Codecov Report

Base: 80.30% // Head: 80.37% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (956bc88) compared to base (738888d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   80.30%   80.37%   +0.06%     
==========================================
  Files          26       26              
  Lines         853      856       +3     
==========================================
+ Hits          685      688       +3     
  Misses        168      168              
Impacted Files Coverage Δ
src/model/bpr_matrix_factorization.jl 97.50% <100.00%> (+0.06%) ⬆️
src/model/matrix_factorization.jl 97.29% <100.00%> (+0.07%) ⬆️
src/model/svd.jl 94.11% <100.00%> (+0.36%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Since an entire approximated matrix is stored in a recommender, making
bulk prediction can be efficient by extracting values of given indices.
Avoid multithreading for simplicity; builk predict is now called a
thread that calls `recommend`, and hence nested thread spawns many cause
complication.
Otherwise, aggregated metric may take an incomplete list of top-k recs
containing undef.
@takuti takuti changed the title Cache matrix factorization-based recommendation scores Optimize recommend() with bulk prediction Nov 21, 2022
@takuti takuti merged commit 1b59992 into master Nov 22, 2022
@takuti takuti deleted the model-cache branch November 22, 2022 15:57
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