This project is a collection of optimization algorithms.
Project description
This package is a collection of optimization algorithms. The aim is high diversity of optimizers and eased of use.
For documentation, Visit this.
Usage
from bejoor.genetic import BaseGeneticAlgorithm
def func(sol):
return abs( (sol[0]**sol[3] + sol[1]**sol[3] - sol[2]**sol[3]))
solution_vector = [{"type": "integer", "lower_bound": 1, "upper_bound": 500}] * 3 + \
[{"type": "integer", "lower_bound": 2, "upper_bound": 100}] + \
[{"type": "float", "lower_bound": 0, "upper_bound": 1}] * 2 + \
[{"type": "string", "possible_values": ["option1", "option2", "option3"]}]
bga = BaseGeneticAlgorithm(objective_function=func, solution_vector_size=7,
solution_vector=solution_vector, optimization_side="min", target_objective_upper_bound=5,
crossover_probability=0.9, mutation_probability=0.1,
elitism_rate=0.05, selection_strategy="roulette",
crossover_type="one-point", population_size=500, epochs=200)
bga.run()
print(bga.best_solution)
print(bga.best_objective_value)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bejoor-0.1.0.tar.gz
(14.9 kB
view details)
Built Distribution
bejoor-0.1.0-py3-none-any.whl
(26.5 kB
view details)
File details
Details for the file bejoor-0.1.0.tar.gz
.
File metadata
- Download URL: bejoor-0.1.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84922094f22d3e17797095d53c4abf879482f54e7c5438be819cf68d9583d934 |
|
MD5 | bd41abd5a0057b90c980d152e5be718c |
|
BLAKE2b-256 | 6d398780a96eb6ee74060af9b2bad37dc6d6c171eed6ff2ac0b6263fd685387a |
File details
Details for the file bejoor-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: bejoor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b27afb1b209e54500730688daf652996a80d79a28721ce88724f075afb4753d |
|
MD5 | 11c7f3a548cc39a8ea1ed741af23f94c |
|
BLAKE2b-256 | baf436174e2ddb47f7f900304235a4228619639959a3a8c54225e5d62f1d6cd2 |