Skip to main content

Heuristics for derivative-free optimization

Project description

Status: Experimental / alpha – do not use yet

This library currently implements particle swarm optimization and offers base classes to quickly implement other (meta-)heuristic optimization algorithms for continuous domains (as opposed to discrete / combinatorial optimization).

Scope and Audience

Heuristic optimization algorithms (sometimes called metaheuristics) aim to find approximate global optima on problems that are intractable for exact algorithms. They make no guarantees regarding the optimality of the result (in particular, they are not approximation algorithms).

On the upside, these heuristics make few – if any – assumptions about the objective function: It can be non-differentiable or even discontinuous and may have multiple local and global minima.

However, this library originated from a specific use case and thus makes some assumptions (which may also evolve in the future). E.g.,

  • we assume that objective function evaluations are “costly” (measured in seconds rather than milliseconds, so that an algorithm’s implementation itself is certainly not a performance bottleneck),

  • we only handle “soft” constraints using penalties,

  • we may take liberties when converting real-valued inputs to floating-point or rational representations (due to numeric properties of our problems).

Now, even if this still sounds like a good fit for your project, at this point you should probably consider using a more mature alternative or indeed rolling your own solution tailored to your precise problem.

Installation

pip install heuristic_optimization

Usage

See examples/.

Credits

Both tisimst/pyswarm and ljvmiranda921/pyswarms implement particle swarm optimization in Python and served as inspiration (but did not quite fit the use case).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heuristic_optimization-0.4.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

heuristic_optimization-0.4.3-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file heuristic_optimization-0.4.3.tar.gz.

File metadata

File hashes

Hashes for heuristic_optimization-0.4.3.tar.gz
Algorithm Hash digest
SHA256 e220e6e02d0e13e2f39c3026100c560226ad51caed6065ad5fa2decc08d3a218
MD5 f61defb74a8e397f7fc355f23f3a8612
BLAKE2b-256 cd44b803f024f3980f01f4b370640cde9add76c36676b320536fc19fbe786491

See more details on using hashes here.

File details

Details for the file heuristic_optimization-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for heuristic_optimization-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b9587df8d454d3388cc21547fb07da4e4cf6123cb5e32bfbb059e08ffcd42bba
MD5 7578e9908bd539e317a184721d44eadf
BLAKE2b-256 7fa1bf549230334f2573819a0080236fbb71c03e806e39c4bc7947b7f50db03c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page