Skip to content

Repository files navigation

🧠 Machine Learning Algorithms Repository

A comprehensive, interview-ready, and portfolio-level ML repository covering algorithms from basic to advanced — with theory, math, implementation, and analysis for every algorithm.


📁 Repository Structure

ML-Algorithms-Repository/
│
├── Supervised_Learning/
│   ├── Linear_Regression/
│   ├── Logistic_Regression/
│   ├── Decision_Trees/
│   ├── Random_Forest/
│   ├── Support_Vector_Machine/
│   ├── K_Nearest_Neighbors/
│   ├── Naive_Bayes/
│   └── Gradient_Boosting/
│
├── Unsupervised_Learning/
│   ├── K_Means_Clustering/
│   ├── DBSCAN/
│   ├── Hierarchical_Clustering/
│   └── Gaussian_Mixture_Models/
│
├── Dimensionality_Reduction/
│   ├── PCA/
│   ├── LDA/
│   └── t_SNE/
│
├── Ensemble_Methods/
│   ├── Bagging/
│   ├── Boosting_AdaBoost/
│   └── XGBoost/
│
├── Reinforcement_Learning/
│   ├── Q_Learning/
│   └── Policy_Gradient/
│
├── Optimization_Algorithms/
│   ├── Gradient_Descent/
│   ├── Adam_Optimizer/
│   └── Genetic_Algorithm/
│
└── Neural_Networks/
    ├── Perceptron/
    ├── MLP_Backpropagation/
    └── CNN_Basics/

📌 What Each Algorithm Folder Contains

File Description
README.md Full concept explanation, math, use cases, pros/cons, complexity
implementation.py From-scratch Python + NumPy implementation
visualization.py Plots and graphs (where applicable)

🗺️ Learning Path

🟢 Beginner

  1. Linear Regression → Logistic Regression → KNN → Naive Bayes
  2. K-Means Clustering → PCA

🟡 Intermediate

  1. Decision Trees → Random Forest → SVM
  2. Gradient Descent → Adam Optimizer
  3. DBSCAN → Hierarchical Clustering

🔴 Advanced

  1. Gradient Boosting → AdaBoost → XGBoost
  2. Perceptron → MLP Backpropagation → CNN Basics
  3. Q-Learning → Policy Gradient
  4. t-SNE → LDA

🛠️ Requirements

pip install numpy matplotlib scikit-learn pandas seaborn

All core implementations use only NumPy (no sklearn for the algorithm itself).


📊 Algorithm Complexity Summary

Algorithm Time (Train) Time (Predict) Space
Linear Regression O(n·d²) O(d) O(d²)
Logistic Regression O(n·d·i) O(d) O(d)
Decision Tree O(n·d·log n) O(log n) O(n)
Random Forest O(t·n·d·log n) O(t·log n) O(t·n)
SVM O(n²–n³) O(sv·d) O(sv)
KNN O(1) O(n·d) O(n)
K-Means O(n·k·i·d) O(k·d) O(n+k)
PCA O(n·d²) O(d·k) O(d²)

🤝 How to Use

git clone https://github.com/yourusername/ML-Algorithms-Repository
cd ML-Algorithms-Repository
python Supervised_Learning/Linear_Regression/implementation.py

Built for learning, interviews, and portfolio showcase.

About

Interview-ready ML algorithms repository covering 30+ algorithms from scratch using NumPy -- supervised, unsupervised, ensemble, deep learning, and reinforcement learning. Includes theory, math, implementation, and complexity analysis

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages