facebookresearch / nevergrad

A Python toolbox for performing gradient-free optimization
https://facebookresearch.github.io/nevergrad/
MIT License
3.92k stars 352 forks source link

Supporting sigma/mutable_sigma per dimension in ng.p.Array #814

Open alexd314 opened 3 years ago

alexd314 commented 3 years ago

Is it possible to define sigma/mutable sigma per dimension in ng.p.Array ? i.e:

jrapin commented 3 years ago

Hey, I won't have time to get a close look before some time, but I would say it should be possible. If I recall correctly you should be able to define sigma as an ndarray/Array, and if you set a 0 value to it that it would not mutate. Would that work ? In one test case we provide row-wise sigmas for instance: https://github.com/facebookresearch/nevergrad/blob/2e17ef6eaadaa0c30aa578b26f2b6345eb9f68e8/nevergrad/functions/photonics/core.py#L64-L65