This is Assignment 3 by Jinho Nam for CS 4850 (Foundation of AI) course.
The dependencies for this project are listed in requirements.txt. Python virtual environment will install all of the items within the file.
- Clone this repository.
- Navigate to the cloned project directory.
- Create a Python virtual environment.
python -m venv .venv
- Activate the virtual environment.
- For Linux,
source ./.venv/bin/activate - For Windows,
.\.venv\Scripts\activate\
- For Linux,
- Install dependencies
pip install -r requirements.txt
This is the instruction what code to run to get the answers for questions in PDF file. If the Python virtual environment and the dependencies are installed succesfully, this instruction will give the result as supposed.
-
Question 1
simpleAutoencoder.pyandQ1.pyare the corresponding files for the answers.- For the 2-D plot, refer to the lines 32 and 33 in
Q1.py. Once following the instruction from those lines, runQ1.py. - For the 3-D plot, refer to the lines 106 and 107 in
Q1.py. Once following the instruction from those lines, runQ1.py. - Example output (2-D plots):

- Example output (3-D plots):
The output plots are also at here as .png file.
-
Question 2
simpleAutoencoder.pyandQ2.pyare corresponding files for the answers.- To see the result of model 1 with layers
d → 50 → 2 → 50 → d, refer to lines 23-25 and 58-61 insimpleAutoencoder.py, and runQ2.py. - To see the result of model 2 with layers
d → 100 → 50 → 2 → 50 → 100 → d, refer to lines 28 and 32 and 64-69 insimpleAutoencoder.py, and runQ2.py. - To see the result of model 3 with layers
d → 200 → 100 → 50 → 2 → 50 → 100 → 200 → d, refer to lines 35-41 and lines 72-79, and runQ2.py - Example output (model 1):

- Example output (model 2):

- Example output (model 3):
"All of the above accuracies are calculated based on the true test-label dataset and the predicted test-label dataset."
-
Question 3
simpleANNClassifierPyTorch.py,utilityDBN.pyandQ3.pyare corresponding files for the answers.- To see the result, simply run
Q3.py - Example output:
"The error rate of the graph starts increasing after the certain number of neurons(320). This means that the model overfitts at the training data beyond the certain point."