An open API service indexing awesome lists of open source software.

https://github.com/codestrate/miniml_toolkit


https://github.com/codestrate/miniml_toolkit

Last synced: 7 months ago
JSON representation

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!