Giter Site home page Giter Site logo

ml-ai-nlp-ir / noisyopt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andim/noisyopt

0.0 2.0 0.0 111 KB

Python library for optimizing noisy functions.

Home Page: http://noisyopt.readthedocs.io/

License: MIT License

Python 97.85% TeX 2.15%

noisyopt's Introduction

License Latest release Py2.7/3.x

Status Build Status Documentation Status Coverage Status

JOSS DOI

Noisyopt: A python library for optimizing noisy functions

Currently the following algorithms are implemented:

  • robust pattern search with adaptive sampling
  • simultaneous perturbation stochastic approximation

Both algorithms support bound constraints and do not require to explicitely calculate the gradient of the function.

We do not attempt to find global optima -- look at scikit-optimize for Bayesian optimization algorithms aimed at finding global optima to noisy optimization problems. For optimizing functions that are not noisy take a look at scipy.optimize.

Installation

Noisyopt is on PyPI so you can install it using pip install noisyopt.

Alternatively you can install it from source by obtaining the source code from Github and then running python setup.py install in the main directory. If you install from source, you first need to install numpy and scipy if these packages are not already installed.

Getting started

Find the minimum of the noisy function obj(x) with noisyopt:

import numpy as np
from noisyopt import minimizeCompass

def obj(x):
    return (x**2).sum() + 0.1*np.random.randn()

bounds = [[-3.0, 3.0], [0.5, 5.0]]
x0 = np.array([-2.0, 2.0])
res = minimizeCompass(obj, bounds=bounds, x0=x0, deltatol=0.1, paired=False)

Documentation

You can access the documentation online at Read the docs. If you install from source you can generate a local version by running make html from the doc directory.

Support and contributing

For bug reports and enhancement requests use the Github issue tool, or (even better!) open a pull request with relevant changes. If you have any questions don't hesitate to contact me by email ([email protected]) or Twitter (@andimscience).

You can run the testsuite by running pytest in the top-level directory.

You are cordially invited to contribute to the further development of noisyopt!

noisyopt's People

Contributors

andim avatar baughn avatar

Watchers

Apurv Verma avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.