| imgs | ||
| plots | ||
| presentation | ||
| scripts | ||
| utils | ||
| .gitignore | ||
| cancer-risk-factors.csv | ||
| kmeans.py | ||
| knn.py | ||
| main.py | ||
| plot-results.py | ||
| README.md | ||
| report.pdf | ||
| requirements.txt | ||
| results-tuning.csv | ||
CSC4025Z Artificial Intelligence Assignment 2: Neural Networks
Neural network model dedicated to the classification of cancer types a patient is likely to have.
Requirements
- Python (tested with version 3.13.7)
- torch (tested with version 2.9.0)
- pandas
- scikit-learn (tested with version 1.7.2)
- tqdm
- matplotlib (for plot-results.py)
- seaborn (for plot-results.py)
Note: Please ensure bash shell is used. All above listed requirements will be automatically installed when using ./install.sh.
Usage
- Run
./scripts/install.sh. This will create thevenvfor you and install all dependencies. - Run
./scripts/run-baseline.sh. This will run./kmeans.pyand./knn.pyfor you and execute the baseline programs. - Run
./scripts/run-main.sh. This will run./main.pyfor you and execute the neural network program with optimal hyper-parameters. - Run
./scripts/automate-tuning.sh. This will run./main.py --hyperparameter_searchfor you and execute the neural network program with the automated hyperparameter search. This might take a while depending on your device's performance. Output is written to results-tuning.csv - Run
./scripts/plot-results.sh. This will run./plot_results.pyfor you and generate plots.
Run ./scripts/cleanup.sh when complete to remove generated files such as the virtual environment and caches.
Optional arguments can be given to ./scripts/run-main.sh. To see all available options, run ./scripts/run-main.sh --help.
Note: Python virtual environment setup varies by operating system environment. Please manually set up the virtual environment and install the dependencies listed above if automated creation from the below steps fails. You can then manually invoke the Python scripts (such as main.py) instead of using the venv helper scripts. Using accelerator devices such as GPUs may also require manual setup to install the required libraries, such as ROCm for AMD GPUs or CUDA for NVIDIA GPUs.
Authors and acknowledgment
- Unays Bhad (BHDUNA001)
- Channing Bellamy (BLLCHA013)
- Raaziq Parkar (PRKRAA002)