GithubHelp home page GithubHelp logo

distributed-de's Introduction

Distributed Differential Evolution

About

Python implementation of Differential Evolution algorgitm. It's a fast converging algorhithm for finding global optima of hard to optimize multidimensional real valued functions. It can utilize multi-processor and multi-core machines or it can be distributed over the network.

Dependencies

  • Python 2.7
  • NumPy

Basic Usage

In [1]: import de
In [2]: def func(x):
			return 100*(x[0]**2 - x[1])**2 + (1 - x[0])**2
In [3]: saddle = de.Function(func, 2, (-2.048,)*2, (2.048,)*2)
In [4]: diffevol = de.DifferentialEvolutionMP(pop_size=40, f=0.9, cr=0.9, proc_count=4)
In [5]: min, pt = diffevol.find_min(saddle)
In [6]: min, pt
Out[6]: (0.0, array([ 1.,  1.]))

Example above (using iPyhon), first imports de module, then creates a function to be optimized. In this case it's Rosenbrock's saddle. The third step creates DE function object 'saddle' passing to constructor: function to be optimized, number of function parameters, and lower and upper bounds of the function. Fourth step instanciets differenctial algorithm. Parameters passed to constructor are algorithm population size, factor of differential amplification f, cross over rate cr, and the number of processors. Fifth steps runs the algorhitm. The result is tuple where the first element is the minimum of the function, and the second element is array with parameters where functions has a minimum.

Tests

To run unit tests:

$ cd distributed_de/test
$ python unittest_suite.py 

More detailed documentation can be found in the doc strings. More examples can be found in the test code.

distributed-de's People

Contributors

ogimart avatar

Watchers

 avatar

Forkers

fqx9904

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.