Skip to content

Commit

Permalink
indicate when similarity matrix computation is done
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Dec 8, 2016
1 parent b16ec05 commit f989277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions surprise/prediction_algorithms/algo_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,11 @@ def compute_similarities(self):

args += [self.trainset.global_mean, bx, by, shrinkage]

print('Computing the {0} similarity matrix...'.format(name))
try:
return construction_func[name](*args)
print('Computing the {0} similarity matrix...'.format(name))
sim = construction_func[name](*args)
print('Done computing similarity matrix.')
return sim
except KeyError:
raise NameError('Wrong sim name ' + name + '. Allowed values ' +
'are ' + ', '.join(construction_func.keys()) + '.')
2 changes: 1 addition & 1 deletion surprise/prediction_algorithms/knns.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SymmetricAlgo(AlgoBase):
"""This is an abstract class aimed to ease the use of symmetric algorithms.
A symmetric algorithm is an algorithm that can can be based on users or on
items indiferently, e.g. all the algorithms in this module.
items indifferently, e.g. all the algorithms in this module.
When the algo is user-based x denotes a user and y an item. Else, it's
reversed.
Expand Down

0 comments on commit f989277

Please sign in to comment.