porgo
When I was researching a function without given all local minima, like the underlined function:
$$ f(x)=\sum_{i=1}^{n/2}(-13+x_{2i-1}+((5-x_{2i})x_{2i}-2)x_{2i})^2+(-29+x_{2i-1}+((x_{2i}+1)x_{2i}-14)x_{2i})^2. $$
I used optimtool.unconstrain to search local minima, got an efficient experience about searching the nearest minimum point. Add a mechanism to jump out of the local area would increase the runtime of the whole script, so porgo is a new progam to accelerate to search global minima.
refer to test.py and the global minima of 4-dimensional $f(x)$ is (5, 4, 5, 4).
glos
glos is the main runtime to serve as a global search class, users can run train_gen module with given cycles at any times until the function searching process converged.
init:
- objective_function: Callable, a high-dimensional function with convex, non-convex, and many local minima.
- bounds: List[List[float]] | List[Tuple[float]], changes this value makes a significant influence of mini and fit_mini.
- mutation: float=0.5, increase this value makes the search radius larger.
- recombination: float=0.9, increase this value allows larger number of mutation.
rand_pop:
- population_size: int=50, randomly init the population (or called initial points) with shape at (population, dimension).
- verbose: bool=False, whether to output initial population when manually replace the random generated rule.
train_gen:
- cycles: int=1000, try to run several times (until converged) when give a smaller cycle number if search bounds is in large space.
result:
- minimum: bool=False, whether to output mini and fit_mini after first if struct was executed.
- verbose: bool=False, whether to output console information after search populations were updated (check self.mini and self.fit_mini, the top3 updated results are (self.mini, self.fit_mini) < (self.medi, self.fit_medi) < (self.maxi, self.fit_maxi)).
reference
Storn, R and Price, K, Differential Evolution - a Simple and Efficient Heuristic for Global Optimization over Continuous Spaces, Journal of Global Optimization, 1997, 11, 341 - 359.
LICENSE
Metadata
Release files for porgo 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| porgo-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for porgo-1.1.1-py3-none-any.whl |
Release files / porgo-1.1.1-py3-none-any.whl
| Download URL | porgo-1.1.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d22abf6ae890893a8620a90aee305f93ae19cfe0ba060a67fbc7379c8f28eea
|
|
BLAKE2b-256 checksum How to use checksums |
8bbc891cd02336a95c20f9770dda64b98c711b839dbf294380913d75cdb51967
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/6.0.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.12
|
Security for porgo 1.1.1
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.