Closed VesnaT closed 2 years ago
NMF crashed with ZeroDivisionError: float division when all ratings for a user (or. an item) were 0.
ZeroDivisionError: float division
Fix sgd() to skip update step when the rating is 0.
sgd()
The rating could be 'fixed' to a very small number to enable further updates.
LGTM, I'm also experiencing the same error.
Issue
NMF crashed with
ZeroDivisionError: float division
when all ratings for a user (or. an item) were 0.Description of changes
Fix
sgd()
to skip update step when the rating is 0.Alternative approach
The rating could be 'fixed' to a very small number to enable further updates.