All Projects → hpparvi → PyDE

hpparvi / PyDE

Licence: GPL-2.0 license
Differential evolution global optimization in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PyDE

pytorch-minimize
Newton and Quasi-Newton optimization with PyTorch
Stars: ✭ 51 (+82.14%)
Mutual labels:  optimization, minimization
Hyperopt.jl
Hyperparameter optimization in Julia.
Stars: ✭ 144 (+414.29%)
Mutual labels:  optimization, global-optimization
Optimization
A set of lightweight header-only template functions implementing commonly-used optimization methods on Riemannian manifolds and convex spaces.
Stars: ✭ 66 (+135.71%)
Mutual labels:  optimization
vrpy
A python framework for solving the VRP and its variants with column generation.
Stars: ✭ 94 (+235.71%)
Mutual labels:  optimization
decrypticon
Java-layer Android Malware Simplifier
Stars: ✭ 17 (-39.29%)
Mutual labels:  optimization
hopperOptimizations
A mod that optimizes hoppers and their interactions with entities and inventories. It drastically reduces hopper lag without changing any behavior.
Stars: ✭ 65 (+132.14%)
Mutual labels:  optimization
mysql tuning-cookbook
Chef cookbook to create MySQL configuraiton files better suited for your system.
Stars: ✭ 23 (-17.86%)
Mutual labels:  optimization
gtfstidy
A tool for checking, sanitizing and minimizing GTFS feeds.
Stars: ✭ 75 (+167.86%)
Mutual labels:  minimization
optimization
Routing optimization module module for Itinero.
Stars: ✭ 47 (+67.86%)
Mutual labels:  optimization
geneal
A genetic algorithm implementation in python
Stars: ✭ 47 (+67.86%)
Mutual labels:  optimization
minicon
Minimization of the filesystem for containers
Stars: ✭ 70 (+150%)
Mutual labels:  minimization
mcmc
A C++ library of Markov Chain Monte Carlo (MCMC) methods
Stars: ✭ 108 (+285.71%)
Mutual labels:  differential-evolution
CSDP.jl
Julia Wrapper for CSDP (https://projects.coin-or.org/Csdp/)
Stars: ✭ 18 (-35.71%)
Mutual labels:  optimization
StochasticOptimization.jl
Implementations of stochastic optimization algorithms and solvers
Stars: ✭ 26 (-7.14%)
Mutual labels:  optimization
genx
Genx provides modular building blocks to run simulations of optimization and search problems using Genetic Algorithms
Stars: ✭ 31 (+10.71%)
Mutual labels:  optimization
gams.jl
A MathOptInterface Optimizer to solve JuMP models using GAMS
Stars: ✭ 27 (-3.57%)
Mutual labels:  optimization
LaplacianOpt.jl
A Julia/JuMP Package for Maximizing Algebraic Connectivity of Undirected Weighted Graphs
Stars: ✭ 16 (-42.86%)
Mutual labels:  optimization
ProxSDP.jl
Semidefinite programming optimization solver
Stars: ✭ 69 (+146.43%)
Mutual labels:  optimization
LBFGS-Lite
LBFGS-Lite: A header-only L-BFGS unconstrained optimizer.
Stars: ✭ 98 (+250%)
Mutual labels:  optimization
structural-imbalance
Demo for analyzing the structural imbalance on a signed social network.
Stars: ✭ 22 (-21.43%)
Mutual labels:  optimization

PyDE

Global optimization using differential evolution in Python [Storn97].

Installation

git clone https://github.com/hpparvi/PyDE.git
cd PyDE
python setup.py install [--user]

Basic usage

Import the class from the package

from pyde.de import DiffEvol

Create a DiffEvol instance

de = DiffEvol(minfun, bounds, npop)

where minfun is the function to be optimized, bounds is an initialization array, and npop is the size of the parameter vector population.

Now, you can run the optimizer ngen generations:

res = de.optimize(ngen=100)

or run the optimizer as a generator:

for res in de(ngen=100):
    do something

Usage with emcee

The PyDE parameter vector population can be used to initialize the affine-invariant MCMC sampler emcee when a simple point estimate of the function minimum (or maximum) is not sufficient:

de = DiffEvol(lnpost, bounds, npop, maximize=True)
de.optimize(ngen)

sampler = emcee.EnsembleSampler(npop, ndim, lnpost)
sampler.run_mcmc(de.population, 1000)

References

[Storn97]Storn, R., Price, K., Journal of Global Optimization 11: 341--359, 1997

API

pyde.de.DiffEvol (minfun, bounds, npop, F=0.5, C=0.5, seed=0, maximize=False)

Parameters

minfun:Function to be minimized.
bounds:Parameter space bounds as [npar,2] array.
npop:Size of the parameter vector population.
F:Difference amplification factor. Values between 0.5-0.8 are good in most cases.
C:Cross-over probability. Use 0.9 to test for fast convergence, and smaller values (~0.1) for a more elaborate search.
seed:Random seed.
maximize:An optional switch telling whether we want maximize or minimize the function. Defaults to minimization.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].