Package requirememt: numpy
- There are four test scripts in
rootdir for part (d) - i,ii, iii, ivpython3 testTennis.pypython3 testIris.pypython3 testIrisSelection.pypython3 testIrisReplacement.py
- Main Genetic Algorithm implementation script is
genetic_algorithm.py - To enable plotting (needs matplotlib), add the argument
plotOn=Trueto Genetic class object initialization - The class init function contains docstring to explain all the possible parameters and their defaults
- Logs for part d.i and d.ii, are present in
./logsdir - Plots naming convention:
<population_size>_<max_rules_allowed>_<generation_no>_<data_name>.png500_5_150_iris.png
iris_rules.pngandtennis_rules.pngshows train and test accuracy along with Human-readable learned rules