ea-presentation

所属分类:collect
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-08-24 12:41:06
上 传 者sh-1993
说明:  进化算法(EA)表示库
(Repository for presentation on evolutionary algorithms (EA))

文件列表:
.vscode/ (0, 2023-08-25)
.vscode/extensions.json (218, 2023-08-25)
.vscode/launch.json (408, 2023-08-25)
.vscode/settings.json (799, 2023-08-25)
LICENSE (1074, 2023-08-25)
data/ (0, 2023-08-25)
data/data_set.csv (984534, 2023-08-25)
main.py (933, 2023-08-25)
presentation.pdf (2774326, 2023-08-25)
requirements.txt (122, 2023-08-25)
src/ (0, 2023-08-25)
src/ga.py (4530, 2023-08-25)
src/linear_regression.py (1743, 2023-08-25)
src/metrics.py (3226, 2023-08-25)
src/parameters.py (150, 2023-08-25)
src/results.py (895, 2023-08-25)
tests/ (0, 2023-08-25)
tests/conftest.py (78, 2023-08-25)
tests/test_ga.py (1978, 2023-08-25)
tests/test_linear_regression.py (1273, 2023-08-25)
tests/test_metrics.py (822, 2023-08-25)

# EA presentation Code repository for the presentation on evolutionary algorithms "What can we learn from evolution?" for Capgemini August 25th 2023. The algorithm showcased here is a variation on the simple genetic algorithm (SGA), whit the following parameters: | Parameter | Value | | ------------------ | --------------------- | | Representation | Bit-strings | | Recombination | 1-Point crossover | | Mutation | Bit flip | | Parent selection | Tournament selection* | | Survival selection | Generational | *Traditionally, roulette wheel has been used by the SGA. Tournament selection was chosen here instead due to its simplicity and speed. ## Installation To install the project dependencies, run the following at the terminal: ```bash pip install -r requirements.txt ``` ## Run the optimizer The main script is located (conveniently) in [main.py](https://github.com/nicklasbekkevold/ea-presentation/blob/master/main.py). To start it, run the following at the terminal: ```bash python main.py ``` ## Unit tests The unit tests are located in the `tests/`-folder. To execute them, run the following at the terminal: ```bash python -m pytest tests/ ``` ## Results The results of the optimization become available after each run in the `results/`-folder. Each run contains the following: ```bash results ┣ 1 ┣ 2 ┣ ... ┣ 3 ┣ ┣ ga.png # generational plot of the GA optimization progress ┣ ┣ metrics.csv # population metrics for each generation (generation, baseline, best, average, entropy) ┣ ┣ parameters.py # parameters used to obtain the respective results ┣ ┣ solution.txt # best solution found at termination ```

近期下载者

相关文件


收藏者