Skip to content
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

How to use 'popsize_factor' option? #275

Open
strukturen opened this issue Nov 1, 2024 · 1 comment
Open

How to use 'popsize_factor' option? #275

strukturen opened this issue Nov 1, 2024 · 1 comment

Comments

@strukturen
Copy link

Could you explain how the popsize_factor should be used. As far as I understood it just alters the population size, e.g. if I define popsize = 100 and popsize_factor = 0.9 it just calculates new iterations with a population of 90. Why should we not just define it as popsize = 90? I understood that the population size starts with 100, then 90 in the next iteration then 81 and so on?

Thank you for the clarification and the great package!

@nikohansen
Copy link
Contributor

import cma

cma.CMAOptions('popsize_fac')
{'popsize_factor': '1  # multiplier for popsize, convenience option to increase default popsize'}

In contrast to popsize, popsize_factor defines the population size relative to the popsize value. This can be sometimes convenient, for example when we don't know the default population size or when sweep through different dimensions and want a population size which is twice the default. That is all there is to it.

As far as I understood it just alters the population size, e.g. if I define popsize = 100 and popsize_factor = 0.9 it just calculates new iterations with a population of 90.

Kind-of, yes.

Why should we not just define it as popsize = 90?

There is no good reason, if you do want a popsize of 90.

I understood that the population size starts with 100, then 90 in the next iteration then 81 and so on?

no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants