add mosaic and warmup to hyperparameters (#931)

This commit is contained in:
Glenn Jocher 2020-09-13 14:08:06 -07:00
parent f1c63e2784
commit 5a9c5c1d3b
1 changed files with 2 additions and 2 deletions

View File

@ -1210,13 +1210,13 @@ def plot_evolution(yaml_file='data/hyp.finetune.yaml'): # from utils.general im
x = np.loadtxt('evolve.txt', ndmin=2) x = np.loadtxt('evolve.txt', ndmin=2)
f = fitness(x) f = fitness(x)
# weights = (f - f.min()) ** 2 # for weighted results # weights = (f - f.min()) ** 2 # for weighted results
plt.figure(figsize=(10, 10), tight_layout=True) plt.figure(figsize=(10, 12), tight_layout=True)
matplotlib.rc('font', **{'size': 8}) matplotlib.rc('font', **{'size': 8})
for i, (k, v) in enumerate(hyp.items()): for i, (k, v) in enumerate(hyp.items()):
y = x[:, i + 7] y = x[:, i + 7]
# mu = (y * weights).sum() / weights.sum() # best weighted result # mu = (y * weights).sum() / weights.sum() # best weighted result
mu = y[f.argmax()] # best single result mu = y[f.argmax()] # best single result
plt.subplot(5, 5, i + 1) plt.subplot(6, 5, i + 1)
plt.scatter(y, f, c=hist2d(y, f, 20), cmap='viridis', alpha=.8, edgecolors='none') plt.scatter(y, f, c=hist2d(y, f, 20), cmap='viridis', alpha=.8, edgecolors='none')
plt.plot(mu, f.max(), 'k+', markersize=15) plt.plot(mu, f.max(), 'k+', markersize=15)
plt.title('%s = %.3g' % (k, mu), fontdict={'size': 9}) # limit to 40 characters plt.title('%s = %.3g' % (k, mu), fontdict={'size': 9}) # limit to 40 characters