You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lmf): correct four bugs in lmf_update negative sampling
Bug A: item_vectors.shape[1] returned n_factors+2, not n_items.
Fix: use shape[0].
Bug B: RNGVector range was [0, nnz-1] and i = indices[index] only
samples from already-interacted items (popularity-biased, never
zero-interaction items). Fix: sample i directly from [0, n_items).
Bug C: outer negative-sample loop and inner factor loops all used
as the loop variable. Each inner loop left _ == n_factors, so the
outer loop ran at most once regardless of neg_prop.
Fix: use f for inner factor loops.
Bug D: a single RNG seeded with nnz-1 was shared by the user-update
pass (needs item IDs) and item-update pass (needs user IDs).
Fix: two separate RNGVector instances with correct ranges.
0 commit comments