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
Population size #47
Comments
Hello @vanquanTRAN, the initial population is generated from initial positions. Increase the initial positions to a number bigger than the population, by setting: The current warning is: I will change this to make it clear how to increase the population. |
I tried to modify all parameters of initialize={"grid": 100, "random": 100, "vertices": 2000}, however with population size 50, the current warning always stay |
Hello @vanquanTRAN, I need a complete example that I can copy and run. Additionally I need the information about the python and hyperactive version + your OS. |
-- coding: utf-8 --""" @author: Admin import matplotlib.pyplot as plt data = pd.read_csv(r"data_tv.csv") #sns.pairplot(data) from sklearn.model_selection import cross_val_score def model(opt):
search_space = {"n_estimators": list(range(500, 600,10)),
optimizer = ParticleSwarmOptimizer(population=50, hyper = Hyperactive() |
i use hyperactive 3.2.3 |
in your example code I do not see how you used the |
import numpy as np from .base_population_optimizer import BasePopulationOptimizer class ParticleSwarmOptimizer(BasePopulationOptimizer, Search):
I modified in the particle_swarm_optimization.py of package gradient_free_optimizers |
Hello @vanquanTRAN, it looks like you are changing the source code of Hyperactive. You should not do this. The way Hyperactive behaves should only be changed by using the official API: If you want to learn how to use Hyperactive you can also look into the tutorial: |
Look into the FAQ of the readme. Can the bug be resolved by one of those solutions?
Describe the bug
Code to reproduce the behavior
Error message from command line
System information:
Additional context
Dear Simon,
i have one question relating the population size of PSO,
search_space,
initialize={"grid": 4, "random": 2, "vertices": 4},
population=10,
inertia=0.5,
cognitive_weight=0.5,
social_weight=0.5,
temp_weight=0.2,
rand_rest_p=0.03,
)
i can not increase the population size which is automatically reduced to 10 when i modifies to 20 or greater ? i tried to midifiy on file search.py
but it is not changed anything, so can you help me to debug this issue please ?
I would investigate the population effect on time-consuming and cost function of my problem.
Thank you for your help
The text was updated successfully, but these errors were encountered: