Removed ~ from score and shorter training

This commit is contained in:
Dominik Moritz Roth 2021-10-12 20:10:48 +02:00
parent f27d89e43d
commit 6689c3bf6b

View File

@ -547,9 +547,9 @@ def addScoreToLabels(G):
node['label'] += " ("+str(node['rating'])+")" node['label'] += " ("+str(node['rating'])+")"
else: else:
if 'score' in node and node['score'] != None and 'se' in node: if 'score' in node and node['score'] != None and 'se' in node:
node['label'] += " (~{:.2f}±{:.1f})".format(node['score'], node['se']) node['label'] += " ({:.2f}±{:.1f})".format(node['score'], node['se'])
else: else:
node['label'] += " (~0±∞)" node['label'] += " (0±∞)"
def genAndShowHTML(G, showButtons=False, darkMode=False, arrows=False): def genAndShowHTML(G, showButtons=False, darkMode=False, arrows=False):
@ -858,7 +858,7 @@ def train(initGamma = 1, full=True):
else: else:
stagLen = 0 stagLen = 0
if stagLen == 4 or mse > 50: if stagLen == 4 or mse > 50:
print("#") if full or mse > 10:
stagLen = 0 stagLen = 0
gamma = initGamma gamma = initGamma
if random.random() < 0.50: if random.random() < 0.50:
@ -868,6 +868,8 @@ def train(initGamma = 1, full=True):
weights = copy.copy(bestWeights) weights = copy.copy(bestWeights)
for wt in weights: for wt in weights:
weights[wt] *= 0.975+0.05*random.random() weights[wt] *= 0.975+0.05*random.random()
else:
break
print('Done.') print('Done.')
def saveWeights(weights): def saveWeights(weights):