From 44c0c189d708081d1b13e0b35f2a6ae40a8522a7 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 7 Mar 2022 13:51:26 +0100 Subject: [PATCH] Better recommender scores --- caliGraph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caliGraph.py b/caliGraph.py index 4e80385..083138b 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -398,7 +398,7 @@ def scoreOpinions(G, globMu, globStd): node['mean'], node['std'] = norm.fit(feedbacks) node['se'] = globStd / math.sqrt(len(feedbacks)) ratio = len(feedbacks) / len(adjacens) - node['score'] = node['mean'] + node['score'] = node['mean'] + globStd/3 - node['se'] node['feedbacks'] = feedbacks else: node['score'] = None @@ -1186,7 +1186,7 @@ def findNewBooks(G, books, mu, num=-1, minRecSco=5): ses.append(min(ses)) scores.append(mu) node['fake_se'] = sum(ses)/(len(ses)**1.2) + 0.5 + 0.5 * (len(scores)==2) # This is not how SE works. DILLIGAF? - node['score'] = sum(scores)/len(scores)*1.2 - node['fake_se']*2 + 0.5 - 0.1/math.sqrt(len(scores)) + node['score'] = sum(scores)/len(scores)*1.2 - node['fake_se']*1.6 + 0.5 - 0.1/math.sqrt(len(scores)) if len(scores)==2: node['score']*=0.80 node['value'] = 20 + 5 * float(node['score'])