The repository is designed to provide python examples to every model and data reduction technique seen throughout COMP4702. In each example, vectors from the input space are provided as load_data
method in data.py
will guarantee the inputs and outputs will meet this specification. As an example, the iris data set can be loaded as
>>> data, labels = load_data("iris", labels=True)
>>> print(data.shape)
(150, 4)
>>> print(labels.shape)
(150,)
The content listed by weeks with a specific file dedicated to each topic.
- Try your hand at applying these models to past exam data sets.
This assumes you have git, python3 and pip3 installed. To start navigate to a folder you would like to download this repo and run:
git clone https://github.com/Michae1CC/COMP4702.git COMP4702-examples
You should find a newly created folder called COMP4702-examples
. Change into this folder by running cd COMP4702-examples
. Next download all the required packages by running:
pip3 install -r requirements.txt
PyTorch will need to be installed through their website. You should now be able to run any example with the main folder:
python3 main/k_means.py