Skip to content

Machine Learning algorithms implemented from scratch using Python. Covers both supervised and unsupervised learning with datasets and notebooks.

Notifications You must be signed in to change notification settings

ZohaibSattarDataAI/Machine-Learning-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Machine Learning From Scratch

Welcome to Machine Learning From Scratch — a comprehensive, beginner-friendly, and professional repository containing classic Machine Learning algorithms implemented in two ways:

From Scratch (Pure Python) — for complete understanding of the math and logic
With Scikit-learn — for production-ready and fast implementation

📌 This project includes only Machine Learning algorithms (no deep learning), with clean code, real datasets, and Jupyter notebooks for practice.


Machine Learning Algorithum

Link:Machine Learning From Scratch


🎯 Project Mission

To help students, developers, and AI enthusiasts learn Machine Learning the right way — by implementing core algorithms manually and then applying the same models using Scikit-learn for practical use.


🧠 Algorithms Included

Each folder includes:

  • Python code (from scratch)
  • Scikit-learn version
  • Dataset(s)
  • Jupyter notebook(s)

🔹 Supervised Learning

📈 Regression

  • ✅ Simple Linear Regression
  • ✅ Polynomial Linear Regression
  • ✅ Multiple Linear Regression
  • ✅ Lasso Regression
  • ✅ Ridge Regression
  • ✅ Random Forest Regression
  • ✅ XGBoost Regressor (Scikit-learn version only)
  • ✅ Decision Tree Regressor
  • ✅ LightGBMRegressor
  • ✅ CastboostRegression
  • ✅ ElasticNet Regression
  • ✅ BayesianRidge Regression
  • ✅ Gradient Boosting Regression
  • ✅ Support Vector Machine (SVM) Regression
  • ✅ K-Nearest Neighbors (KNN) Regression
  • ✅ Huber Regression
  • ✅ Orthogonal Matching Pursuit (OMP)

🔍 Classification

  • ✅ Logistic Regression
  • ✅ Bernoulli Naive Bayes
  • ✅ Multinomial Naive Bayes
  • ✅ Naive Bayes Classification
  • ✅ Decision Tree Classification
  • ✅ K-Nearest Neighbors (KNN)
  • ✅ Support Vector Machine (SVM)
  • ✅ Random Forest Classifier (Scikit-learn only)

🔹 Unsupervised Learning

  • ✅ K-Means Clustering
  • ✅ Hierarchical Clustering
  • ✅ DBSCAN
  • ✅ PCA (Principal Component Analysis)
  • ✅ Apriori Algorithm (Association Rule Mining)
  • ✅ Frequent Pattern Growth (FP-Growth)


📘 Requirements

  • Python 3.x
  • NumPy, Pandas, Matplotlib, Seaborn
  • Scikit-learn (for sklearn versions only)

Install dependencies:

pip install numpy pandas matplotlib seaborn scikit-learn

💼 Use Cases

This repository is perfect for:

  • Students learning ML theory and code
  • Preparing for interviews and exams
  • Building data science portfolios
  • Training models with real datasets

🙌 Author

Zohaib Sattar
📧 Email: [zabizubi86@gmail.com] 🔗 LinkedIn: Zohaib Sattar


⭐️ Support the Project

If you find this project helpful, please ⭐️ star the repo and share it with your network. It motivates further open-source contributions!