-
Notifications
You must be signed in to change notification settings - Fork 9
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
Additional parameters to complete the objective function #1
Comments
Added an optional parameter in all algorithms called opts, that allows the user to specify as many optional fixed parameters as he/she wants. This parameter can be changed within executions of the same or a different algorithm. TODO: Docs & PyPi upgrade
In my opinion, you should define your library under classes. I just have look at L-shade method only. I think it would be easier to pass global variables to different methods and give more flexibility by creating possibility of adjusting inputs rather than using only your default parameters. |
Another question about DE: Why do you compare the population of current generation to 4 (for example: |
Currently I don't have enought time to change the entire library to use classes. Now you can use a new parameter called 'opts' that will be passed to the fitness function in which you can include whatever you. See the simple example at the end of README.md You can change all of the parameters that the function apply gets by modifying the params dict. There may be some parameters fixed in the code by default to the values used by the author of each algorithm. If that's the case and you need access to some of them, open a new issue and I will work on that when possible. 4 is not the mimimum size of the current generation but the minimum size of a generation during the algorithm (reached at the end). That's because the current-to-pbest mutation, requires at least 4 individuals to work. See Eq. 10 on L-SHADE paper Thanks for your feedback. |
For those who would need to do such a thing: don't forget python's functools. from functools import partial
def objective_function(x, param1, param2, param3):
pass
objective_function_cmplt = partial(objective_function, param1=..., param2=..., param3=...) |
Hello,
Is it possible to add more inputs that are fixed parameters needed to completely specify the objective function (different to parameter need to estimate)?
Thank you very much for sharing your library. It helps me so much.
The text was updated successfully, but these errors were encountered: