No more stability-metric for the nn (but se instead)

This commit is contained in:
Dominik Moritz Roth 2021-09-24 17:35:32 +02:00
parent ec8d253f3a
commit f48fb12f0a

View File

@ -354,8 +354,10 @@ def scoreUnread(G, globMu, globStd, errorFac=-0.6):
node['se'] = globStd / math.sqrt(len(feedbacks))
feedbacks.append(node['std'])
weights.append(getWeightForType('sigma'))
feedbacks.append(1-1/len(feedbacks))
weights.append(getWeightForType('stability'))
feedbacks.append(node['se'])
weights.append(getWeightForType('se'))
#feedbacks.append(1-1/len(feedbacks))
#weights.append(getWeightForType('stability'))
node['mean'] = sum([fb*w for fb, w in zip(feedbacks, weights)])/len(feedbacks)
node['score'] = node['mean'] + errorFac*node['se']
else:
@ -716,7 +718,7 @@ def train(gamma = 0.1):
weights[attr] = -0.1+random.random()*1.5
else:
weights[attr] += delta
if attr not in ['sigma', 'mu', 'stability']:
if attr not in ['sigma', 'mu', 'se']:
weights[attr] = min(max(0, weights[attr]), 3)
mse = evaluateFitness(books)
if mse < best_mse: # got better