This is a python library with numpy implementations of common machine learning algorithms. This was built for educational purposes as a means to learn the details of machine learning algorithms for myself. I also hope that others who are learning machine learning will benefit from viewing these numpy implementations.
This repository takes inspiration from a similar repository linked below that I recommend checking out for alternative implementations: https://github.com/eriklindernoren/ML-From-Scratch
- Clone this repo locally.
- In Terminal, run
pip install -e .
within root directory of repository.
List of algorithms implemented:
- Linear Regression
- Logistic Regression
- Gaussian Discriminant Analysis
- Naive Bayes Classifier
- Support Vector Machine
- CART Decision Tree
- Random Forest
- K-means clustering
- Neural Network
Each algorithm listed below will have all or subset of the following links:
- Code : This link directs you to the numpy implementation code of the algorithm within the
ml_scratch
library. - Notebook : This link directs you to a jupyter notebook demonstrating the algorithm with a dataset. It also includes the code for generating the matplotlib visualizations shown in this readme.
Two solvers are implemented to fit data: (1) normal equations and (2) gradient descent.
Two solvers are implemented to fit data: (1) gradient descent and (2) Newton's method.
- Code (Coming soon. Numpy implementation is in notebook link below)
- Notebook
This implementation is a simplified version of the full Sequential Minimal Optimization (SMO) algorithm.
- Code (Coming soon. Numpy implementation is in notebook link below)
- Notebook
- Code (Coming soon. Numpy implementation is in notebook link below)
- Notebook