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.0.8.tar.gz
(8.5 kB
view details)
Built Distribution
bejoor-0.0.8-py3-none-any.whl
(14.0 kB
view details)
File details
Details for the file bejoor-0.0.8.tar.gz
.
File metadata
- Download URL: bejoor-0.0.8.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b10c6cc73feebece4f0208e359a0374ee901f20f7fe0c15a3153c73cf6cdc499 |
|
MD5 | e9c0afd77e3e213c638bceb6d58dd469 |
|
BLAKE2b-256 | 1cc1962c065da5cd6951dd68ec1fef9b6393e655a4bd0512dc217d973c5bc817 |
File details
Details for the file bejoor-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: bejoor-0.0.8-py3-none-any.whl
- Upload date:
- Size: 14.0 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 | 52bba7ba7c485a791de0a8b6de83746a0327d127f0f6bea203bcc12fec11887c |
|
MD5 | 33eeff8d7e33713d5d88b5a7ff82a563 |
|
BLAKE2b-256 | 5167ac7301ed12ee1d890619cefb1c3f6a31eb9a4c87d31ef0aed66ec54fe7a0 |