Skip to content

Commit

Permalink
lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Oct 11, 2018
1 parent 111f7ec commit 3ceef08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lenskit/algorithms/als.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _train_iters(self, current, uctx, ictx):
_logger.debug('[%s] finished item epoch %d', self.timer, epoch)
di = np.linalg.norm(imat - current.item_features, 'fro')
if current.user_features is not None:
du = np.linalg.norm(umat - current.user_features, 'fro')
du = np.linalg.norm(umat - current.user_features, 'fro')
else:
du = np.nan
_logger.info('[%s] finished epoch %d (|ΔI|=%.3f, |ΔU|=%.3f)', self.timer, epoch, di, du)
Expand Down Expand Up @@ -220,4 +220,5 @@ def predict(self, model, user, items, ratings=None):
return res

def __str__(self):
return 'als.BiasedMF(features={}, regularization={})'.format(self.features, self.regularization)
return 'als.BiasedMF(features={}, regularization={})'.\
format(self.features, self.regularization)

0 comments on commit 3ceef08

Please sign in to comment.