Showing 4 of 15 total issues
Function fit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fit(self, ratings, **kwargs):
"""
Train a FunkSVD model.
Args:
Function predict_for_user
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def predict_for_user(self, user, items, ratings=None):
_logger.debug("predicting %d items for user %s", len(items), user)
if ratings is None:
if user not in self.user_index_:
_logger.debug("user %s missing, returning empty predictions", user)
Function fit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fit(self, ratings, **kwargs):
"""
Train a model.
The model-training process depends on ``save_nbrs`` and ``min_sim``, but *not* on other
Avoid too many return
statements within this function. Open
Open
return problems