From 07da41f1f5babbdfc57f4b9b31a1cdb54859605f Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 11 Feb 2022 18:12:49 +0100 Subject: [PATCH] Allow a little more recommenders --- caliGraph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/caliGraph.py b/caliGraph.py index e657bbe..9f5f8bb 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -873,7 +873,7 @@ def recommendNBooksTagBased(G, mu, std, n, removeTopListsB=True): scaleOpinionsByRating(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) removeBad(G, mu-std-0.5) removeBad(G, mu+std/2, groups=['recommender']) @@ -902,8 +902,8 @@ def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommende removeUselessSeries(G, mu) removeUselessTags(G) removeUselessReadBooks(G) + removeThinRecs(G, 2 + 1 * (n>20 and not v3d)) removeKeepBest(G, n, maxDistForRead=1.25) - removeThinRecs(G, 3) scaleBooksByRating(G) scaleOpinionsByRating(G) @@ -1351,7 +1351,7 @@ def cliInterface(): elif args.recommender_based: recommendNBooksRecommenderBased(G, mu, std, args.n, not args.keep_top_lists, not args.keep_useless_recommenders) 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": listScores(G, mu, std, args.n) elif args.cmd=="read":