PlaygroundML is a repository containing implementations of various commonly used machine learning models and algorithms. I wrote this project with the aim of elucidating some key methods in machine learning and understanding how things work in practice. Feel free to play around with my code or use it for reference.
To clone the repository and install the required packages, run the following commands in the terminal:
git clone https://github.com/olibridge01/PlaygroundML.git
cd PlaygroundML
pip install -r requirements.txt
The repository is divided into directories corresponding to each ML algorithm/model that I have implemented. Each directory contains:
- A Python file containing the implementation of the algorithm/model.
- A Jupyter notebook containing a demonstration of the algorithm/model on a toy dataset, including relevant equations/background theory.
- Any miscellaneous files (e.g. plots/gifs).
The directories are as follows:
-
01-LinearRegression
: Plain old linear regression, regression with a feature map$\mathbf{\phi}(\mathbf{x})$ , and ridge regression ($L_2$ regulariser). -
02-kNearestNeighbours
:$k$ -NN algorithm for a two-dimensional toy dataset. -
03-KernelRidgeRegression
: Kernel ridge regression with a Gaussian kernel, including cross-validation for hyperparameter determination. -
04-SupportVectorMachines
: SVMs implemented on toy datasets (linearly separable, linearly nonseparable and nonlinearly separable). -
05-GaussianProcesses
: Gaussian process regression on a toy dataset of noisy training data. -
06-GaussianMixtureModels
: Gaussian mixture models implemented on a toy dataset. -
07-kMeansClustering
:$k$ -means clustering on toy data.
Below is a selection of plots generated by running my implementations on toy datasets. Where possible, I plot an animation to show how the algorithm behaves as it learns.
|
Gaussian Process Regression |
---|---|
EM Algorithm for Gaussian Mixture Model |
|
---|---|
|
Placeholder |
---|---|
Oli Bridge ([email protected])
Feel free to explore the different directories, and please reach out if you have any questions or suggestions. 🚀