From 2bb2e15b73fe0725b5bdcb48557924d4b3ce0d3b Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sat, 25 Sep 2021 20:15:14 +0200 Subject: [PATCH] Tweaks to recommendation-display --- caliGraph.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/caliGraph.py b/caliGraph.py index 04713c1..e8f39f8 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -622,6 +622,7 @@ def recommendNBooksTagBased(G, mu, std, n, removeTopListsB=True): removeDangling(G, alsoBooks=True) removeKeepBest(G, n+math.ceil(n/20), maxDistForRead=1.5) removeUselessReadBooks(G) + removeUselessTags(G) removeKeepBest(G, n, maxDistForRead=1.25) scaleBooksByRating(G) @@ -636,19 +637,20 @@ def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommende removeHighSpanTags(G, 12) removeHighSpanReadBooks(G, 6) removeDangling(G, alsoBooks=False) - pruneRecommenders(G, 12) + pruneRecommenders(G, 13) pruneTags(G, 13) removeBad(G, mu, groups=['book']) removeUselessReadBooks(G) pruneTags(G, 12) pruneAuthorCons(G, int(n/5)) - pruneRecommenders(G, 11) + pruneRecommenders(G, 12 - min(5, n/20)) removeUselessTags(G) if removeTopListsB: removeTopLists(G) removeDangling(G, alsoBooks=True) - removeKeepBest(G, n+math.ceil(n/20), maxDistForRead=1.5) + removeKeepBest(G, n+math.ceil(n/20)+3, maxDistForRead=1.5) removeUselessReadBooks(G) + removeEdge(G) removeKeepBest(G, n, maxDistForRead=1.25) scaleBooksByRating(G)