Skip to content

A world-class expert would master machine learning by deeply understanding algorithms and implementing them from scratch without using high-level libraries like TensorFlow, PyTorch, or Scikit-learn. Here are some advanced project recommendations to achieve mastery:

ronnie-allen/Building-Models-from-Scratch-No-Libraries-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Advanced Machine Learning Projects: Building Models from Scratch (No High-Level Libraries)

Becoming truly proficient in machine learning isn't just about using frameworks like TensorFlow or Scikit-learnβ€”it's about understanding the math and logic behind the models. This repository is a personal challenge to explore and implement core ML algorithms entirely from scratch, using only NumPy and Pandas, with zero reliance on high-level machine learning libraries.


βœ… 1. Neural Network from Scratch (Completed)

This is the first project I took up to explore what it truly means to build a neural network without relying on any deep learning libraries. I implemented:

  • Forward and backward propagation
  • Weight updates via gradient descent
  • Softmax and one-hot encoding
  • Debugging parameter initialization and numerical stability issues
  • Training on the MNIST dataset (handwritten digits)

All components like activation functions, loss functions, and gradient updates were written from scratch. You can read the full conceptual explanation in the accompanying blog post and view the implementation in the neural-network-from-scratch folder.


🚧 2. Convolutional Neural Network (CNN) from Scratch – In Progress

A deeper dive into image processing, with custom implementations of convolution, pooling, and dense layers. The goal is to train the model on CIFAR-10.


🚧 3. Transformer Model for NLP from Scratch – In Progress

Rebuilding the self-attention mechanism and encoder-decoder architecture used in modern NLP models like BERT and GPT.


🚧 4. Generative Adversarial Network (GAN) from Scratch – In Progress

A powerful deep learning concept where two networksβ€”generator and discriminatorβ€”compete to improve each other. Plan is to generate realistic digits using only noise input.


🚧 5. Deep Q-Network (Reinforcement Learning) – In Progress

Creating a custom DQN agent to solve environments like Flappy Bird or CartPole using nothing but core Python and math.


🚧 6. Support Vector Machine (SVM) from Scratch – In Progress

Implementing SVMs from scratch using hinge loss and optimization, with kernel support coming as an extension.


🚧 7. Decision Tree & Random Forest – In Progress

Building a classifier by recursively splitting datasets using information gain, and later combining multiple trees into a forest.


🚧 8. Word2Vec (Skip-Gram + CBOW) – In Progress

Recreating the famous Word2Vec architecture to learn word embeddings from scratch using a text corpus.


🚧 9. Naive Bayes Classifier – In Progress

Applying probability theory to build a simple, yet powerful classifier without pre-built libraries.


🚧 10. Principal Component Analysis (PCA) – In Progress

Performing dimensionality reduction using eigen decomposition and visualizing the principal components of datasets like MNIST.


πŸ” How Each Project Will Be Structured

Each project will include:

  • πŸ“˜ A dedicated blog-style explanation (no code, just the concept and math)
  • πŸ“ A code folder with clean, modular Python implementations
  • πŸ“Š Visualizations using Matplotlib where applicable
  • πŸ” Comparisons with library implementations (for verification)

⚠️ Note

At this stage, only the Neural Network project is complete. All other projects are currently under development, and will be pushed in phases with complete documentation and explanation.

Stay tuned!

About

A world-class expert would master machine learning by deeply understanding algorithms and implementing them from scratch without using high-level libraries like TensorFlow, PyTorch, or Scikit-learn. Here are some advanced project recommendations to achieve mastery:

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published