From 8778cfdae69498d267d5031e5a97c1b4ec44a9d6 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 17 Oct 2021 15:50:33 +0200 Subject: [PATCH] Also dont train on whitepapers --- caliGraph.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caliGraph.py b/caliGraph.py index 9719a69..4261344 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -795,7 +795,7 @@ def waveFlow(G, node, n, dist, menge, firstEdge=False): if node in bestlist or node in keeplist: waveFlow(G, node, m, dist, menge, firstEdge=firstEdge) -def evaluateFitness(books, debugPrint=False): +def evaluateFitness(books, debugPrint=False, ignoreWhitepapers=True): global weights G = buildBookGraph(books) graphAddAuthors(G, books) @@ -804,6 +804,9 @@ def evaluateFitness(books, debugPrint=False): graphAddSeries(G, books) graphAddTags(G, books) + if ignoreWhitepapers: + removeWhitepapers(G) + ratedBooks = [n for n in list(G.nodes) if 'rating' in G.nodes[n] and G.nodes[n]['rating'] != None] boundsLoss = 0 linSepLoss = []