-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected stagnation with VonNeumann and Pyramid topologies #521
Comments
I am adding more info with the following error that occurred after waiting on a stagnated pyramid pso. 2023-10-26 07:42:52,778 - pyswarms.single.general_optimizer - INFO - Optimize for 500 iters with {'c1': 0.5, 'c2': 0.5, 'w': 0.5, 'r': 15, 'p': 1} While executing: | qhull d Qt QJ0.001 Qc Qbb Qx At error exit: Delaunay triangulation by the convex hull of 50 points in 26-d: Number of input sites: 39 Statistics for: | qhull d Qt QJ0.001 Qc Qbb Qx Number of points processed: 38 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Dear pyswarms contributors and maintainers,
I have noticed while extensively using pyswarms for neural network training when i am using as topology the VonNeumann or Pyramid architectures, my swarms are facing a strong stagnation that i cannot explain. The error i think it has to do with the argument r which is the range of VonNeumann topology (which i can't find it anywhere in the literature except some references that are not exactly describing what you mean by r). Some of the times, due to r selection in combination with the number of particles returns the following error
Traceback (most recent call last):
File "/home/earthtech/salinity/von_neumann_tuning_8.py", line 131, in
cost, pos = optimizer.optimize(f, iters=iters)
File "/home/earthtech/.local/lib/python3.10/site-packages/pyswarms/single/general_optimizer.py", line 252, in optimize
self.swarm.best_pos, self.swarm.best_cost = self.top.compute_gbest(
File "/home/earthtech/.local/lib/python3.10/site-packages/pyswarms/backend/topology/von_neumann.py", line 50, in compute_gbest
return super(VonNeumann, self).compute_gbest(swarm, p, k)
File "/home/earthtech/.local/lib/python3.10/site-packages/pyswarms/backend/topology/ring.py", line 78, in compute_gbest
idx_min = swarm.pbest_cost[self.neighbor_idx].argmin(axis=1)
IndexError: index 64 is out of bounds for axis 0 with size 64
My neural network is for regression analysis with 1 hidden layer of 6 neurons, 8 inputs at the input layer and 1 neuron in the output.
I have executed a lot of tests, hyperparameter tuning procedures and validation procedures with the same source code on a large number of feature subsets with LocalBest and GlobalBest PSO implementations and i faced no problem.
I am running on Ubuntu 20.04, python 3.10 and pyswarms 1.3.0
I have tried to contact some of you through email or personal accounts on social media.
Hope that we will find a solution.
Thanks for your contribution to the Evolutionary Intelligence community.
Best Regards,
Earthtech
The text was updated successfully, but these errors were encountered: