Also dont train on whitepapers

This commit is contained in:
Dominik Moritz Roth 2021-10-17 15:50:33 +02:00
parent 3588587c92
commit 8778cfdae6

View File

@ -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 = []