https://github.com/codestrate/miniml_toolkit
https://github.com/codestrate/miniml_toolkit
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codestrate/miniml_toolkit
- Owner: CodeStrate
- Created: 2025-07-11T17:31:50.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-07-15T06:59:15.000Z (8 months ago)
- Last Synced: 2025-07-15T15:05:43.856Z (8 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ MiniML-Toolkit โ Machine Learning Using Only NumPy and Pure Math
Welcome to **MiniML-Toolkit**, a DIY machine learning sandbox where we rebuild models from scratch using nothing but **NumPy** and a love for math.
No scikit-learn. No black boxes. Just gradients, dot products, and clean Python code.
---
## ๐ฆ Features
โ
Simple Linear Regression (1 feature)
โ
Multiple Linear Regression (n features)
โ
Gradient Descent optimizer
โ
Custom Standard Scaler
โ
Manual Train/Test Split
โ
Rยฒ, MSE, RMSE Metrics โ from scratch
---
## ๐ง Project Structure
```
MiniML-Toolkit/
โโโ models/
โ โโโ simple_linear_regression.py # SLR model (1 X, 1 y)
โ โโโ multiple_linear_regression.py # MLR model (n X, 1 y)
โ โโโ and more !!!
โโโ utils/
โ โโโ standard_scaler.py # Custom StandardScaler class
โ โโโ model_utils.py # Normalizer and Train Test Splitter
โโโ app.py # Run MLR/SLR training + evaluation
โโโ requirements.txt
โโโ README.md
````
---
## ๐ ๏ธ Installation
### ๐ Using `venv` (Recommended)
```bash
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
````
### ๐ Or use `conda`
```bash
conda create -n miniml python= -y
conda activate miniml
pip install -r requirements.txt
```
---
## โถ๏ธ How to Run
```bash
python app.py
```
modify `app.py` directly to experiment with parameters, datasets, and iterations.
---
## ๐ Sample Output
```text
[MLR] Initial MSE: 22.14
[MLR] Final RMSE: 4.11 | Rยฒ: 0.704
[SLR] Initial MSE: 33.8
[SLR] Final RMSE: 5.47 | Rยฒ: 0.52
```
---
## ๐ฌ Why This Exists
Because nothing beats learning ML like writing it from scratch.
This toolkit is about understanding **how** things work, not just *that* they work.
More models (logistic regression, neural nets, etc.) coming soon!
---
## ๐งช Requirements
```bash
numpy
pandas
loguru
# optionally add matplotlib , seaborn for visuals
```
Install via:
```bash
pip install -r requirements.txt
```
---
## ๐ค Contributing
Ideas? Fixes? New models?
Open an issue or PR โ this project is open to all math-loving developers.
---
## ๐ License
MIT. Use it, learn from it, and feel free to build your own toolkit on top!