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

facing issue in using scaling_of_variables cma es for my problem. #210

Closed
pramodiisc opened this issue Aug 23, 2022 · 2 comments
Closed
Assignees

Comments

@pramodiisc
Copy link

pramodiisc commented Aug 23, 2022

I am having a function f(x1,x2,x3,x4,x5,x6) that has to be minimised for the variable x1,x2,x3,x4,x5,x6. The range for the variables or the search domain is
x1 (300 to 1500),
x2 (0-10),
x3 (300 to 1500),
x4(0-10) ,
x5 (500 to 20000),
x6 (0-200)
which means the algo should search for variable falling in this range.

I am getting the function value from a simulator.

help(cma.fitness_transformations.ScaleCoordinates) is not clear to me how can I use it for my problem.

sigma0
scalar, initial standard deviation in each coordinate. sigma0 should be about 1/4th of the search domain width (where the optimum is to be expected). The variables in objective_function should be scaled such that they presumably have similar sensitivity. See also option scaling_of_variables.

if I am not usingcaleCoordinates I can not use sigma 0 bigger than 10 (x4(0-10) ) which is making the algo not searching in wider domain.

Can you please share or show any simpler example.

@nikohansen
Copy link
Contributor

nikohansen commented Jan 29, 2023

One typical approach is to scale the variables such that the above domain is sent to the interval [0, 1] in each variable (e.g. with ScaleCoordinates, for the first variable we would put multipliers = 1200, zero = -300/1200 such that 0 -> multipliers * (0 - zero) = 300 and 1 -> multipliers * (1 - zero) = 1500), however see also these practical hints. After that, the search should be bounded to the domain [0,1]. Example code to pass domain boundaries is given in the basic use cases notebook under Options and Bound Constraints.

This example suggests though that ScaleCoordinates could be implemented with a more user friendly interface: it should better return multipliers * x + zero, or it could accept lower and upper coordinate values to which 0 and 1 should map to, respectively, which would then be lower = zero and upper = zero + multipliers or equivalently upper - lower = multipliers.

@nikohansen nikohansen self-assigned this Jan 29, 2023
@nikohansen
Copy link
Contributor

Addressed with commit 5ac2a14

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