Skip to content

A Repo where I create every machine learning model, metrices etc from scratch with just Math and Numpy

Notifications You must be signed in to change notification settings

Wayn-Git/MLFromScratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Machine Learning From Scratch with NumPy Welcome to Machine Learning From Scratch, a comprehensive repository where I implement core machine learning algorithms and concepts directly from first principles using pure Python and NumPy. This project focuses on understanding and building ML foundations from the ground up, without relying on high-level ML libraries.

๐Ÿš€ About This repo is dedicated to demystifying machine learning through hands-on implementation of essential algorithms using only:

Mathematical formulas

NumPy for numerical computations

Python for clear, straightforward code

You'll find implementations for:

Supervised learning algorithms (Linear Regression, Logistic Regression, Decision Trees, etc.)

Classification metrics (Precision, Recall, F1 Score, Accuracy)

Regression metrics (MSE, RMSE, Rยฒ Score)

Other important utilities and helper functions

With this project, I aim to provide learners and enthusiasts a solid understanding of how ML algorithms really work under the hood.

๐Ÿ’ป Features Detailed, math-backed implementations of ML algorithms

Metrics like Precision, Recall, F1 Score implemented from scratch

Error and performance metrics such as MSE, RMSE, Accuracy, and Rยฒ Score

Clear, commented code for easy learning and customization

No dependencies except NumPy โ€” no scikit-learn or TensorFlow used

๐Ÿ“š Topics Covered Data preprocessing and handling

Regression models: Linear Regression and evaluation

Classification models: Logistic Regression and evaluation metrics

Performance metrics: Precision, Recall, Accuracy, F1 Score, MSE, RMSE, Rยฒ

Understanding the math behind these algorithms and metrics

๐Ÿ”ง Installation Clone the repository:

bash git clone https://github.com/your-username/ml-from-scratch.git cd ml-from-scratch Install NumPy if you donโ€™t have it already:

bash pip install numpy Run scripts directly with Python.

๐Ÿ›  Usage Import the functions or classes and use them in your projects or experiments. Example for using the precision function:

python import numpy as np from precision import precision

y_true = np.array([1, 0, 1, 1, 0]) y_pred = np.array([1, 0, 0, 1, 0])

print("Precision:", precision(y_true, y_pred)) ๐Ÿ“– References Detailed explanations of metrics and algorithms are in the code comments aligned with fundamental mathematical formulas.

Inspired by standard textbooks and courses on machine learning and statistical learning theory.

๐Ÿ™Œ Contributions Contributions, suggestions, and improvements are welcome! Feel free to open issues or pull requests.

๐Ÿ“„ License This project is licensed under the MIT License โ€” see the LICENSE file for details.

Thank you for visiting! Happy learning and coding! ๐Ÿš€

Would you like me to customize this README further based on specific algorithms or files you have in your repo?

About

A Repo where I create every machine learning model, metrices etc from scratch with just Math and Numpy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published