Giter VIP home page Giter VIP logo

machinelearningplayground's Introduction

MachineLearningPlayground

Implementation of basic mathematical pattern recognition/machine learning techniques for fun

Setup

  • Download with pip
pip install MLplayground
  • Download with git
git clone https://github.com/lujiazho/MachineLearningPlayground.git

Basic Algorithms

Convolutional Neural Networks (CNN)

Training time on Colab of multiple implementation of CNN with parameters: epochs=20, batch=2.

Model / Dataset (imgs) Loops
CPU
(s/epoch)
NumPy
CPU
(s/epoch)
CuPy
GPU
(s/epoch)
Loops+Numba
CPU
(s/epoch)
Img2col
CPU
(s/epoch)
Img2col+Numba
CPU
(s/epoch)
Baseline / Digits (1k) 255 24 19 2 2 1.5
Lenet / Digits (1k) 464 72 63 4.5 4 4
Lenet / Cifar-10 (100) 184.5 13.5 12 0.9 0.6 0.7

Junior versions

  • ๐Ÿ’ป CNN 1.0 - No Batch No Channel
  • ๐ŸŒฑ CNN 2.0 - No Batch But Channel

Senior versions: Include both batch & channel

  • ๐Ÿ’ฌ CNN 3.0 - NumPy Array accelerated
  • ๐Ÿ”ญ CNN loops - Loops + Numba accelerated
  • โœจ CNN img2col - Img2col Function accelerated

Math Derivation

ML Playground

Notes

  • Learrning rate decay can be easily added to ANN while training because of the design of optimization operation

TODO

For ANN/MLP

  • Relu derivative of D_relu(x==0) could be in [0, 1]
  • add cross entropy loss (multi-class case)
  • change default initialization from uniform(0, 1) to normal(0, 0.1)
  • (Optional) weight initialization: He or Xavier normal

For CNN

  • (Optional) Batch normalization

For decomposition

  • Do X - np.mean(X, axis=0) to data before PCA transform (Align to origin, which is how sklearn did)

For New

  • Add GMM(EM steps)
  • Add CART(single decision tree)
  • Add logistic regression
  • Add Lasso regression
  • (Optional) General Bridge Regression
  • Add LMS for singal processing
  • (Optional) Gaussian Process Regression

machinelearningplayground's People

Contributors

lujiazho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.