Allow a little more recommenders

This commit is contained in:
Dominik Moritz Roth 2022-02-11 18:12:49 +01:00
parent 87433cc97f
commit 07da41f1f5

View File

@ -873,7 +873,7 @@ def recommendNBooksTagBased(G, mu, std, n, removeTopListsB=True):
scaleOpinionsByRating(G) scaleOpinionsByRating(G)
addScoreToLabels(G) addScoreToLabels(G)
def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommenders=True): def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommenders=True, v3d=False):
removeRestOfSeries(G) removeRestOfSeries(G)
removeBad(G, mu-std-0.5) removeBad(G, mu-std-0.5)
removeBad(G, mu+std/2, groups=['recommender']) removeBad(G, mu+std/2, groups=['recommender'])
@ -902,8 +902,8 @@ def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommende
removeUselessSeries(G, mu) removeUselessSeries(G, mu)
removeUselessTags(G) removeUselessTags(G)
removeUselessReadBooks(G) removeUselessReadBooks(G)
removeThinRecs(G, 2 + 1 * (n>20 and not v3d))
removeKeepBest(G, n, maxDistForRead=1.25) removeKeepBest(G, n, maxDistForRead=1.25)
removeThinRecs(G, 3)
scaleBooksByRating(G) scaleBooksByRating(G)
scaleOpinionsByRating(G) scaleOpinionsByRating(G)
@ -1351,7 +1351,7 @@ def cliInterface():
elif args.recommender_based: elif args.recommender_based:
recommendNBooksRecommenderBased(G, mu, std, args.n, not args.keep_top_lists, not args.keep_useless_recommenders) recommendNBooksRecommenderBased(G, mu, std, args.n, not args.keep_top_lists, not args.keep_useless_recommenders)
else: else:
recommendNBooks(G, mu, std, args.n, not args.keep_top_lists, not args.keep_useless_recommenders) recommendNBooks(G, mu, std, args.n, not args.keep_top_lists, not args.keep_useless_recommenders, args.v3d)
elif args.cmd=="listScores": elif args.cmd=="listScores":
listScores(G, mu, std, args.n) listScores(G, mu, std, args.n)
elif args.cmd=="read": elif args.cmd=="read":