lenskit/lkpy

View on GitHub

Showing 4 of 15 total issues

Function fit has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def fit(self, ratings, **kwargs):
        """
        Train a FunkSVD model.

        Args:
Severity: Minor
Found in lenskit/algorithms/funksvd.py - About 1 hr to fix

    Function predict_for_user has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    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)
    Severity: Minor
    Found in lenskit/algorithms/item_knn.py - About 1 hr to fix

      Function fit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def fit(self, ratings, **kwargs):
              """
              Train a model.
      
              The model-training process depends on ``save_nbrs`` and ``min_sim``, but *not* on other
      Severity: Minor
      Found in lenskit/algorithms/item_knn.py - About 1 hr to fix

        Avoid too many return statements within this function.
        Open

            return problems
        Severity: Major
        Found in lenskit/util/debug.py - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language