Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #896 +/- ##
==========================================
+ Coverage 89.38% 89.52% +0.13%
==========================================
Files 226 228 +2
Lines 15607 15845 +238
==========================================
+ Hits 13951 14185 +234
- Misses 1656 1660 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6b5e0a4 to
6ee8d50
Compare
976b10d to
7ce643a
Compare
This reverts commit 515e0cb.
7ce643a to
db22858
Compare
mdekstrand
added a commit
to mdekstrand/lkpy
that referenced
this pull request
Apr 1, 2026
mdekstrand
added a commit
to mdekstrand/lkpy
that referenced
this pull request
Apr 1, 2026
mdekstrand
added a commit
that referenced
this pull request
Apr 1, 2026
Backport pull request #896 to 2025 release series
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the SLIM and fsSLIM models for scoring. Closes #894.
The implementation has a similar structure to the original by the Karypis lab's, but stores residuals instead of estimates for driving the coordinate descent updates. This makes the inner optimization step a little simpler.
It is very different from the RecBole implementation, which uses SciKit-Learn's elastic net implementation to learn item columns.
The Regularization Paths paper specifies that the predictors are standardized, but the Karypis code does not seem to center the predictors, only scale them (implicitly by scaling the updates). The RP paper says it is “obvious” how to extend their method to sparse data like this, but do not provide or explain the relevant derivations. However, if Karypis didn't center, I think we can get away with not centering.
The way scaling is implemented does raise some questions about numerical stability, but I'm not sure that adjusting how the scaling works would fix that concern, or even if it's really a problem.
References: