Removed ~ from score and shorter training
This commit is contained in:
parent
f27d89e43d
commit
6689c3bf6b
24
caliGraph.py
24
caliGraph.py
@ -547,9 +547,9 @@ def addScoreToLabels(G):
|
||||
node['label'] += " ("+str(node['rating'])+")"
|
||||
else:
|
||||
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:
|
||||
node['label'] += " (~0±∞)"
|
||||
node['label'] += " (0±∞)"
|
||||
|
||||
|
||||
def genAndShowHTML(G, showButtons=False, darkMode=False, arrows=False):
|
||||
@ -858,16 +858,18 @@ def train(initGamma = 1, full=True):
|
||||
else:
|
||||
stagLen = 0
|
||||
if stagLen == 4 or mse > 50:
|
||||
print("#")
|
||||
stagLen = 0
|
||||
gamma = initGamma
|
||||
if random.random() < 0.50:
|
||||
for wt in weights:
|
||||
weights[wt] = random.random()
|
||||
if full or mse > 10:
|
||||
stagLen = 0
|
||||
gamma = initGamma
|
||||
if random.random() < 0.50:
|
||||
for wt in weights:
|
||||
weights[wt] = random.random()
|
||||
else:
|
||||
weights = copy.copy(bestWeights)
|
||||
for wt in weights:
|
||||
weights[wt] *= 0.975+0.05*random.random()
|
||||
else:
|
||||
weights = copy.copy(bestWeights)
|
||||
for wt in weights:
|
||||
weights[wt] *= 0.975+0.05*random.random()
|
||||
break
|
||||
print('Done.')
|
||||
|
||||
def saveWeights(weights):
|
||||
|
Loading…
Reference in New Issue
Block a user