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/Dinesh-Sharma2004/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.