Smol tweaks
This commit is contained in:
parent
292951c50c
commit
1521f20340
11
caliGraph.py
11
caliGraph.py
@ -509,7 +509,7 @@ def addScoreToLabels(G):
|
|||||||
node['label'] += " ("+str(node['rating'])+")"
|
node['label'] += " ("+str(node['rating'])+")"
|
||||||
else:
|
else:
|
||||||
if 'score' in node and node['score'] != None:
|
if 'score' in node and node['score'] != None:
|
||||||
node['label'] += " (~{:.2f}±{:.2f})".format(node['score'], node['std'])
|
node['label'] += " (~{:.2f}±{:.1f})".format(node['score'], node['std'])
|
||||||
else:
|
else:
|
||||||
node['label'] += " (~0±∞)"
|
node['label'] += " (~0±∞)"
|
||||||
|
|
||||||
@ -545,26 +545,27 @@ def genScores(G, books):
|
|||||||
def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommenders=True):
|
def recommendNBooks(G, mu, std, n, removeTopListsB=True, removeUselessRecommenders=True):
|
||||||
removeRestOfSeries(G)
|
removeRestOfSeries(G)
|
||||||
removeBad(G, mu-std*2-1)
|
removeBad(G, mu-std*2-1)
|
||||||
removeKeepBest(G, int(n*2) + 5, maxDistForRead=1.5*2)
|
removeKeepBest(G, int(n*2) + 5, maxDistForRead=2)
|
||||||
removeEdge(G)
|
removeEdge(G)
|
||||||
removeHighSpanTags(G, 9)
|
removeHighSpanTags(G, 9)
|
||||||
removeDangling(G, alsoBooks=False)
|
removeDangling(G, alsoBooks=False)
|
||||||
pruneTags(G, 6*2)
|
pruneTags(G, 10)
|
||||||
removeBad(G, mu, groups=['book'])
|
removeBad(G, mu, groups=['book'])
|
||||||
removeUselessReadBooks(G)
|
removeUselessReadBooks(G)
|
||||||
pruneTags(G, 4.25*2)
|
pruneTags(G, 6)
|
||||||
pruneRecommenderCons(G, int(n/7)+1)
|
pruneRecommenderCons(G, int(n/7)+1)
|
||||||
pruneAuthorCons(G, int(n/15))
|
pruneAuthorCons(G, int(n/15))
|
||||||
removeUselessTags(G)
|
removeUselessTags(G)
|
||||||
if removeTopListsB:
|
if removeTopListsB:
|
||||||
removeTopLists(G)
|
removeTopLists(G)
|
||||||
removeDangling(G, alsoBooks=True)
|
removeDangling(G, alsoBooks=True)
|
||||||
removeKeepBest(G, n, maxDistForRead=0.75*2)
|
removeKeepBest(G, n+math.ceil(n/20), maxDistForRead=1.5)
|
||||||
removeEdge(G)
|
removeEdge(G)
|
||||||
removeDangling(G, alsoBooks=True)
|
removeDangling(G, alsoBooks=True)
|
||||||
if removeUselessRecommenders:
|
if removeUselessRecommenders:
|
||||||
removeUnusedRecommenders(G)
|
removeUnusedRecommenders(G)
|
||||||
removeDangling(G, alsoBooks=True)
|
removeDangling(G, alsoBooks=True)
|
||||||
|
removeKeepBest(G, n, maxDistForRead=1.25)
|
||||||
|
|
||||||
scaleBooksByRating(G)
|
scaleBooksByRating(G)
|
||||||
scaleOpinionsByRating(G)
|
scaleOpinionsByRating(G)
|
||||||
|
Loading…
Reference in New Issue
Block a user