Skip to main content
← Lab

slopeint

confirmedupstream bugPython · scikit-surpriseSystems & data structuresJuly 25, 2026

the question

Does scikit-surprise's SlopeOne preserve fractional ratings when computing item deviations?

what came out

scikit-surprise's SlopeOne.fit declares ratings as cdef int, truncating fractional ratings before dev(i,j)=mean(r_ui-r_uj). A 2.5,5.0 pair stores -3.0 not -2.5, predicting 0.75 vs 1.0. Integer ratings match; half-star MovieLens and continuous Jester are wrong. Silent.

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/slopeint