A comprehensive repository dedicated to recreating popular machine learning models from scratch in Python, designed to facilitate deep understanding through practical examples.
Explore the Documentation »
View Demo
·
Report Bug
·
Request Feature
This repository is aimed at providing an educational resource for those seeking to understand the inner workings of machine learning algorithms. While these implementations may not match the efficiency or completeness of mature libraries like scikit-learn
, the focus here is on simplicity and clarity, allowing users to see the mechanics behind each algorithm.
Each subfolder contains a demo.ipynb
notebook that demonstrates a practical application of the corresponding algorithm. This includes loading a dataset, performing basic exploratory data analysis (EDA), and fitting the model to the data.
In addition to the code, a series of articles have been published that provide detailed explanations of each model. These articles cover the mathematical foundations, use cases, assumptions, advantages, and limitations of each algorithm, as well as a thorough breakdown of the corresponding Python implementation. For a deeper understanding, I highly recommend referring to these articles.
Here is a collection of articles detailing the theory and implementation of each model in this repository:
- AdaBoost
- Adam Optimizer
- Batch Normalization
- CART (Classification and Regression Trees)
- Convolutional Neural Networks
- Deep CNN - AlexNet
- ID3 - Decision Trees
- K-Means Clustering
- K-Nearest Neighbors (KNN)
- LSTM (Long Short-Term Memory)
- Nadam Optimizer
- Naive Bayes Classifier
- Neural Networks
- Fine-Tuning Deep Neural Networks
- Principal Component Analysis (PCA)
- Random Forest
- Recurrent Neural Networks
- Stochastic Gradient Descent (SGD)
- Support Vector Classifier (SVC)
- XGBoost
To get started with the project locally, follow these steps:
Ensure you have Python installed on your machine. You can install the necessary packages using either pip
or conda
.
-
Clone the repository:
git clone https://github.com/cristianleoo/models-from-scratch-python.git
-
Install required packages: Navigate to the project directory and install dependencies:
pip install -r requirements.txt
-
(Optional) Run Tests: Validate the setup by running the unit tests:
python -m unittest discover
Now you're ready to explore the repository and learn how these machine learning models work under the hood!
Feel free to reach out via GitHub issues for any bugs, feature requests, or suggestions.
This version maintains the structure but improves the language to make it more polished and professional while emphasizing the educational nature of the project. Let me know if you need further adjustments!