Skip to content

cjm715/ml_scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML-Scratch

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

Installing package ml_scratch

  1. Clone this repo locally.
  2. In Terminal, run pip install -e . within root directory of repository.

The algorithms

List of algorithms implemented:

Each algorithm listed below will have all or subset of the following links:

  1. Code : This link directs you to the numpy implementation code of the algorithm within the ml_scratch library.
  2. 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.

Linear Regression

Two solvers are implemented to fit data: (1) normal equations and (2) gradient descent.

Logistic Regression

Two solvers are implemented to fit data: (1) gradient descent and (2) Newton's method.

Gaussian Discriminant Analysis

Alt text

Naive Bayes Classifier

  • Code (Coming soon. Numpy implementation is in notebook link below)
  • Notebook

Support Vector Machine (SVM)

Alt text

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

Decision Tree

Alt text

Random Forest

K-means clustering

Alt text

  • Code (Coming soon. Numpy implementation is in notebook link below)
  • Notebook

Neural Network

About

Numpy implementations of machine learning algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published