From 558b9d4eba4764aefa3915d3b31158897d87045d Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 11 Feb 2022 12:17:01 +0100 Subject: [PATCH] No more neuralWeights in the repo --- caliGraph.py | 7 +++++-- neuralWeights.json | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 neuralWeights.json diff --git a/caliGraph.py b/caliGraph.py index abcdaab..ae3459e 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -1259,8 +1259,11 @@ def saveWeights(weights): f.write(json.dumps(weights)) def loadWeights(): - with open('neuralWeights.json', 'r') as f: - weights = json.loads(f.read()) + try: + with open('neuralWeights.json', 'r') as f: + weights = json.loads(f.read()) + except IOError: + weights = {"topList": 0.15, "recommender": 0.30, "author": 0.70, "series": 0.05, "tag": 0.05, "pagerank": 0.05, "mu": 0.50, "sigma": 0.30, "bias": 0.25} return weights def cliInterface(): diff --git a/neuralWeights.json b/neuralWeights.json deleted file mode 100644 index 4858c0e..0000000 --- a/neuralWeights.json +++ /dev/null @@ -1 +0,0 @@ -{"topList": 0.0014870629350744668, "recommender": 0.30850613710659763, "author": 0.7875500722234223, "series": 0.02573529043327304, "tag": 0.021428418737707844, "pagerank": 0.035929371002174276, "mu": 0.5195918262356081, "sigma": 0.5461473078015796, "bias": 0.28135362350363} \ No newline at end of file