Skip to content

Michae1CC/COMP4702

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMP4702 - Machine Learning

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 $n \times d$ numpy arrays where $n$ is the number of samples and $d$ is the dimension of the input vectors. For single value outputs, the output vector will be an array of length $n$. For mulitparameter outputs the output vector will have dimensions $n \times k$ where $k$ is the dimension of the output space. Also, class labels will be replaced with integer values ranging from $0$ to $C-1$, where $C$ is the number of classes. Loading datasets via the 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,)

Topics

The content listed by weeks with a specific file dedicated to each topic.

Week 2 - Principles of Supervised Learning

Week 4 - Density Estimation

Week 5 - Clustering

Week 6 - Dimensionality Reduction

Week 7-9 - Neural Networks

Week 12 - Exam Pratice

Setup

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