From d5a6aadbb537167b8555a1e19e67f9612ee2e496 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 24 Sep 2021 17:50:00 +0200 Subject: [PATCH] We now display se instead of std in the web-view; smol changes to the penalties while training --- caliGraph.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/caliGraph.py b/caliGraph.py index b868d5e..7833af9 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -511,7 +511,7 @@ def addScoreToLabels(G): node['label'] += " ("+str(node['rating'])+")" else: if 'score' in node and node['score'] != None: - node['label'] += " (~{:.2f}±{:.1f})".format(node['score'], node['std']) + node['label'] += " (~{:.2f}±{:.1f})".format(node['score'], node['se'] if 'se' in node else 0.0) else: node['label'] += " (~0±∞)" @@ -694,9 +694,11 @@ def evaluateFitness(books): G.nodes[m]['rating'] = None mu, std = genScores(G, books) if G.nodes[m]['score'] > rating: # over estimated - errSq.append(((rating - G.nodes[m]['score'])**2)*1.5) + errSq.append(((rating - G.nodes[m]['score'])**2)*1.25) else: errSq.append((rating - G.nodes[m]['score'])**2) + if rating > 10.0: + errSq[-1] *= 1.5 G.nodes[m]['rating'] = rating return sum(errSq) / len(errSq)