Machine Learning From Scratch
About the Project
"Machine Learning From Scratch" is an educational project that offers Python implementations of fundamental machine learning models and algorithms. The primary aim is educational rather than optimization; the project seeks to demystify the algorithms by presenting their inner workings clearly and accessibly. Through this endeavor, readers can gain a more profound understanding of how these algorithms function beneath the surface.
Installation
To get started with "Machine Learning From Scratch," clone the repository from GitHub and install it using the following commands:
$ git clone https://github.com/eriklindernoren/ML-From-Scratch
$ cd ML-From-Scratch
$ python setup.py install
Examples
The project includes various examples that illustrate the application of different machine learning algorithms. Here are some highlights:
Polynomial Regression
This example demonstrates the training progress of a regularized polynomial regression model, using temperature data from Linköping, Sweden, in 2016.
Classification With CNN
Convolutional Neural Networks (CNNs) are shown here classifying digits from a dataset. The example walks through each layer of the CNN, showing the parameters and output shapes.
Density-Based Clustering
The Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm is employed to cluster data from a moons dataset, providing insight into unsupervised learning techniques.
Generating Handwritten Digits
Using Generative Adversarial Networks (GANs), this example generates handwritten digits. It includes the model structure for both the generator and the discriminator, highlighting the training process.
Deep Reinforcement Learning
This example uses a Deep Q-Network, solving the CartPole-v1 environment from OpenAI gym. It illustrates how reinforcement learning can be applied to solve control problems.
Image Reconstruction With RBM
A Restricted Boltzmann Machine (RBM) is utilized to reconstruct images from the MNIST dataset. This example demonstrates how the network improves at reconstructing the image of a digit as the training progresses.
Evolutionary Evolved Neural Network
An evolutionary approach is applied to train a neural network that classifies the digit dataset. This example underscores the concept of neuroevolution, where networks evolve over generations.
Genetic Algorithm
This example implements a Genetic Algorithm aiming to produce a user-specified target string, showcasing concepts like candidate selection, crossover, and mutation.
Association Analysis
The Apriori algorithm is used to find frequent itemsets and association rules in a set of transactions, demonstrating a technique commonly used in market basket analysis.
Implementations
Supervised Learning
The project contains various supervised learning algorithms, including Adaboost, Decision Tree, Random Forest, and Support Vector Machine, among others.
Unsupervised Learning
Unsupervised learning methods implemented include Apriori, DBSCAN, K-Means, and Principal Component Analysis.
Reinforcement Learning
The project features a Deep Q-Network, demonstrating the principles of reinforcement learning.
Deep Learning
Various deep learning models and layers are implemented, including Convolutional Neural Networks and Recurrent Neural Networks, providing a comprehensive look into this powerful domain.
Contact
For further inquiries, suggestions, or to engage in a conversation, individuals are invited to reach out to Erik via email or connect on LinkedIn.