Python 3.7 is required together with the latest version of the following packages (all available from PIP):
numpy
pandas
matplotlib
scikitlearn
mlrose_hiive
- Clone the code repository on your computer:
git clone https://github.com/fedme/ml-assignment-2
- Navigate to the directory of the optimization problem:
cd ./{continuous_peaks|four_peaks|knapsack}
- Run the optimization for all four algorithms on the problem:
python optimization.py
This will output several stats in form of CSV files inside the stats sub-folder.
- Run the analysis for all four algorithms on the problem:
python analysis.py
This will output several plots in form of PNG files inside the plots sub-folder.
- Navigate to the directory of neural network optimization problem:
cd ./mlp
- Run the optimization of the neural network's weights using all different algorithms:
python mlp_training.py
This will output several stats in form of CSV files inside the stats sub-folder.
- Run the analysis of the results:
python analysis.py
This will output several plots in form of PNG files inside the plots sub-folder.