quickopt
A Python optimization toolkit developed in C++ geared towards multimodal functions, including efficient implementations of Bayesian Optimization with Tree-structured Parzen estimators, Particle Swarm Optimization, and more.
Documentation: Click Here!
Most of the information is found in the documentation - please refer to it! Tutorials, examples, descriptions/breakdowns of algorithms, and references are found here.
Installation
To install the package using PyPi, run the following command:
pip install quickopt
Description
This package is a Python optimization toolkit developed in C++ geared towards global optimization problems, such as those encountered in hyperparameter tuning. It contains a variety of optimization algorithms, which are listed below. The package is designed to be easy to use and flexible, allowing users to use popular optimization methods out of the box in as little as one line of code, while also allowing users to customize the optimization process to suit their needs. A list of the optimization algorithms included in the package is provided below:
-
Simulated Annealing: Compatible with
string,float, andintinputs -
Bayesian Optimization with Tree-Structured Parzen Estimators: Compatible with
floatinputs -
Genetic Algorithm: Compatible with
string,float, andintinputs -
Particle Swarm Optimization: Compatible with
floatinputs
with more to come soon!
Quick Start
To use the package, import the desired optimization function from the package and run it with the desired parameters (described in detail in documentation). For example, to use the Particle Swarm Optimization algorithm for a double function, you would run the following code:
from quickopt.pso import pso
def objective(params): # The function being optimized - this must take inputs as a list
return sum(x**2 for x in params)
space_min = [-1.0, -1.0]
space_max = [1.0, 1.0]
result = pso(funct=objective, space_min=space_min, space_max=space_max, iterations=10) # The optimization is run here
print(result)
Note that some functions have different definitions dependant on variable type. For example, the Simulated Annealing algorithm has different functions for double, integer, and string inputs. The functions are named anneal_double, anneal_int, and anneal_string, respectively. Objective functions must take in inputs as a list, as shown above.
References:
Kirkpatrick, S., C. D. Gelatt, and M. P. Vecchi. 1983. “Optimization by Simulated Annealing.” Science 220 (4598): 671–80. https://doi.org/10.1126/science.220.4598.671.
Shuhei Watanabe, “Tree-Structured Parzen Estimator: Understanding Its Algorithm Components and Their Roles for Better Empirical Performance,” arXiv (Cornell University), January 1, 2023, https://doi.org/10.48550/arxiv.2304.11127.
Bergstra, James, Dan Yamins, and David D. Cox. “Making a Science of Model Search.” arXiv (Cornell University), January 1, 2012. https://doi.org/10.48550/arxiv.1209.5111.
Song, Jiaming, Lantao Yu, Willie Neiswanger, and Stefano Ermon. “A General Recipe for Likelihood-free Bayesian Optimization.” arXiv (Cornell University), January 1, 2022. https://doi.org/10.48550/arxiv.2206.13035.
Falkner, Stefan, Aaron Klein, and Frank Hutter. “BOHB: Robust and Efficient Hyperparameter Optimization at Scale.” arXiv (Cornell University), January 1, 2018. https://doi.org/10.48550/arxiv.1807.01774.
Baluja, Shumeet, and Rich Caruana. 1995. “Removing the Genetics From the Standard Genetic Algorithm.” In Elsevier eBooks, 38–46. https://doi.org/10.1016/b978-1-55860-377-6.50014-1.
Bonyadi, Mohammad Reza, and Zbigniew Michalewicz. 2017. “Particle Swarm Optimization for Single Objective Continuous Space Problems: A Review.” Evolutionary Computation 25 (1): 1–54. https://doi.org/10.1162/evco_r_00180.
Detailed references can be found within documentation.
More
Contact: varunpiram@gmail.com
https://github.com/varunpiram/quickopt
https://pypi.org/project/quickopt/
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for quickopt 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickopt-0.1.8.tar.gz | 14.3 kB | Without provenance | Details for quickopt-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickopt-0.1.8-cp39-cp39-macosx_10_9_x86_64.whl | CPython 3.9 | CPython 3.9 | macOS 10.9+ x86-64 | Details for quickopt-0.1.8-cp39-cp39-macosx_10_9_x86_64.whl |
Total release size: 359.2 kB
Release files / quickopt-0.1.8.tar.gz
| Download URL | quickopt-0.1.8.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a02612ed2faa9146a0664f2a0e0419eb0a8d675e0e4af5c0d158e6604cc0277a
|
|
BLAKE2b-256 checksum How to use checksums |
25a46afe37ee8022ca5d1c523eae562e16d9d936aa326f6a359380a0446da350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.15
|
Release files / quickopt-0.1.8-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | quickopt-0.1.8-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 344.8 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
13c4e5de347453183bee8310154895eeaa0c34b38e3b9300cd162c07f6659466
|
|
BLAKE2b-256 checksum How to use checksums |
6ecf506bdebe783c5d89a975e502a970483a514c283b5d49601a318833127aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.15
|
Security for quickopt 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.