Edited parity plot to allow color to represent 3rd dimension. Still need to improve colorbar axis name.

This commit is contained in:
titusquah
2020-06-16 09:27:19 -06:00
parent 77e4cefd2c
commit 97ca231afc
4 changed files with 168 additions and 114 deletions

View File

@@ -15,8 +15,10 @@ def optimizer(func, x_guess):
ub = np.array([1e1])
bounds = (lb, ub)
options = {'c1': 1e-3, 'c2': 1e-3, 'w': 0.9}
mini_optimizer = ps.single.global_best.GlobalBestPSO(n_particles=100, dimensions=1,
options=options, bounds=bounds)
mini_optimizer = ps.single.global_best.GlobalBestPSO(n_particles=100,
dimensions=1,
options=options,
bounds=bounds)
f_opt, x_opt = mini_optimizer.optimize(func, iters=100)
return x_opt