August 22, 2019

192 words 1 min read

facebookresearch/nevergrad

facebookresearch/nevergrad

A Python toolbox for performing gradient-free optimization

repo name facebookresearch/nevergrad
repo link https://github.com/facebookresearch/nevergrad
homepage
language Python
size (curr.) 12266 kB
stars (curr.) 2389
created 2018-11-21
license MIT License

CircleCI

Nevergrad - A gradient-free optimization platform

Nevergrad

nevergrad is a Python 3.6+ library. It can be installed with:

pip install nevergrad

More installation options and complete instructions are available in the “Getting started” section of the documentation.

You can join Nevergrad users Facebook group here.

Minimizing a function using an optimizer (here OnePlusOne) is straightforward:

import nevergrad as ng

def square(x):
    return sum((x - .5)**2)

optimizer = ng.optimizers.OnePlusOne(parametrization=2, budget=100)
recommendation = optimizer.minimize(square)
print(recommendation)  # optimal args and kwargs
>>> Array{(2,)}[recombination=average,sigma=1.0]:[0.49971112 0.5002944 ]

Example of optimization

Convergence of a population of points to the minima with two-points DE.

Documentation

Check out our documentation! It’s still a work in progress, don’t hesitate to submit issues and/or PR to update it and make it clearer!

Citing

@misc{nevergrad,
    author = {J. Rapin and O. Teytaud},
    title = {{Nevergrad - A gradient-free optimization platform}},
    year = {2018},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://GitHub.com/FacebookResearch/Nevergrad}},
}

License

nevergrad is released under the MIT license. See LICENSE for additional details about it.

comments powered by Disqus