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.5.tar.gz
(25.7 kB
view details)
Built Distribution
bejoor-0.1.5-py3-none-any.whl
(50.8 kB
view details)
File details
Details for the file bejoor-0.1.5.tar.gz
.
File metadata
- Download URL: bejoor-0.1.5.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308468327e8600237bf2423cb291dbc55861f7836b00d594571233bb12f5b966 |
|
MD5 | 2e842288537614875c2af0234db8d11c |
|
BLAKE2b-256 | f61510cc61176817893676a1190c8b3bb8e0c050c59372797ddb6d8163ed9974 |
File details
Details for the file bejoor-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: bejoor-0.1.5-py3-none-any.whl
- Upload date:
- Size: 50.8 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 | f893d5fb127087d9c7515dff3cedc0b69f9d48be169d4bb1801b461823affde7 |
|
MD5 | 6c7bbfe9db73f64690b693c559bd50af |
|
BLAKE2b-256 | bd017b713a5edf4c0ebcf183b6e1bf2635b7d3051971cc5d87bf54f7cc9e32f1 |