LemonML icon indicating copy to clipboard operation
LemonML copied to clipboard

πŸ‹Machine Learning library from scratch.πŸ‹

πŸ‹LemonπŸ‹

Basic Machine Learning / Deep Learning Library

Implemented with numpy and scipy in python codes.

Also includes a simple version of autogradable Tensor.

For more information, please refer to my blog.

Requirements

  • python==3.6
  • numpy==1.17.0
  • scipy==1.2.1
  • torch==1.3.0

Structure

.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ graph
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ _conditional_random_field.py
β”‚Β Β  └── _hidden_markov.py
β”œβ”€β”€ nn
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ _activation.py
β”‚Β Β  β”œβ”€β”€ _base.py
β”‚Β Β  β”œβ”€β”€ _criterion.py
β”‚Β Β  β”œβ”€β”€ _fully_connect.py
β”‚Β Β  └── autograd
β”‚Β Β      β”œβ”€β”€ __init__.py
β”‚Β Β      └── tensor.py
β”œβ”€β”€ supervised
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ _base.py
β”‚Β Β  β”œβ”€β”€ bayes
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  └── _bayes.py
β”‚Β Β  β”œβ”€β”€ knn
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  └── _k_nearest.py
β”‚Β Β  β”œβ”€β”€ linear
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _base.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _linear_regression.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _logistic_regression.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _multi_classifier.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _perceptron.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _regularization.py
β”‚Β Β  β”‚Β Β  └── _support_vector_machine.py
β”‚Β Β  └── tree
β”‚Β Β      β”œβ”€β”€ __init__.py
β”‚Β Β      β”œβ”€β”€ _cart.py
β”‚Β Β      β”œβ”€β”€ _id3.py
β”‚Β Β      └── ensemble
β”‚Β Β          β”œβ”€β”€ __init__.py
β”‚Β Β          β”œβ”€β”€ _adaptive_boosting.py
β”‚Β Β          └── _random_forest.py
β”œβ”€β”€ test
β”‚Β Β  β”œβ”€β”€ nn_models
β”‚Β Β  β”‚Β Β  └── fcnn.py
β”‚Β Β  β”œβ”€β”€ test_graph.py
β”‚Β Β  └── test_supervised.py
β”œβ”€β”€ unsupervised
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ clustering
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _base.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ _kmeans.py
β”‚Β Β  β”‚Β Β  └── _spectral.py
β”‚Β Β  └── decomposition
β”‚Β Β      β”œβ”€β”€ __init__.py
β”‚Β Β      β”œβ”€β”€ _base.py
β”‚Β Β      └── _pca.py
└── utils
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ _batch.py
    β”œβ”€β”€ _cross_validate.py
    β”œβ”€β”€ _make_data.py
    └── _scaling.py

Timeline

  • 2019.6.12
    • [x] Linear Regression
    • [x] Logistic Regression
    • [x] Perceptron
    • [x] utils.scaling / batch / cross_validate
  • 6.13
    • [x] Support Vector Machine
    • [x] K-Nearest-Neighbor
    • [x] test script
  • 6.15
    • [x] Bayes
  • 6.16
    • [x] K-Means
  • 6.19
    • [x] Spectral
    • [x] Principle Component Analysis
  • 6.24
    • [x] Decision Tree(ID3)
  • 7.2
    • [x] Multi-classifier
    • [x] Regularization
  • 7.13
    • [x] Activation
    • [x] Criterion
    • [x] Fully Connected Layer
    • [x] Fully Connected Neural Network Model
  • 8.17-8.20
    • [x] Improve project structure
    • [x] Decision Tree(CART)
    • [x] Random Forest
    • [x] Adaboost
  • 8.23
    • [x] Hidden Markov Model
  • 11.6
    • [x] Conditional Random Field Model(Based on Torch)
    • [x] Autograd Tensor