This repository contains implementations of fundamental Machine Learning algorithms from scratch
using only Python and core libraries like NumPy , Pandas and Matplotlib.
The goal is to understand the inner workings of ML models by building them step-by-step without relying
on high-level frameworks such as scikit-learn or TensorFlow.
-
Linear Regression
-
Logistic Regression
-
Decision Tree
-
k-Nearest Neighbors (k-NN)
-
Naive Bayes
-
DBSCAN
-
K Means
-
Support Vector Machine
-
Random Forest
(More algorithms can be added later!)
ML_Algorithm_from_scratch-main/
βββ ML/
β βββ Linear_regression/ # Implementation of Linear Regression
β βββ Logistic_regression/ # Implementation of Logistic Regression
β βββ KNN/ # Implementation of k-Nearest Neighbors
β βββ Decision_Tree/ # Implementation of Decision Tree
β βββ Random_Forest/ # Implementation of Random Forest
β βββ K_Means/ # Implementation of K means clustering
β βββ DBSCAN/ # Implementation of DBSCAN
β βββ Naive_Bayes/ # Implementation of Naive Bayes
β βββ SVM/ # Implementation of Support Vector Machine
βββ README.md # Project documentation
yaml Copy code
Clone the repo:
git clone https://github.com/yourusername/ML_Algorithm_from_scratch.git
cd ML_Algorithm_from_scratch
Run a specific algorithm example:
bash Copy code python ML/Linear_regression/linear_regression.py Or explore all algorithm folders individually.
Strengthen intuition behind machine learning algorithms.
Understand how training, optimization, and evaluation work internally.
Gain confidence to implement and debug ML models without black-box libraries.
Contributions are welcome!
Fork the repo
Create a new branch (feature-new-algo)
Commit your changes
Submit a Pull Request π
This project is licensed under the MIT License.