Author: Wai Ip Chu
Login: wic2
Created: 23.11.2020
Create a virtual environment and install numpy and TA_Lib using command
$ pip install -r requirements.txt
If you have trouble installing TA-Lib, you can download the .whl here and use command
$ pip install TA_Lib-file-name.whl
Or follow the instruction for installation here
The file GA_config.json include configurations for the Genetic Algorithm:
"population_size": 100
Total number of individuals in each generation
"max_generation": 50
Termination criteria for maximum number of generations
"selection_method": "tournament"
Selection method for individuals to produce offspring (the GA should use tournament selection)
"tournament_size": 5
Number of individuals selected for the tournament
"crossover_method": "one-point"
Crossover operator methods:
- one-point
- two-point
- uniform
"mutation_method": "point"
Mutation operator methods:
- point
- bit-string
"chance_of_mutation": 0.05
Chance of mutation happening
To run the GA, run the following command:
$ python .\CO656_Assignment_wic2.py
The output will show the weighting of the best individual and their fitness score.