https://github.com/kianaabrisham/mlp-pytorch-classifier
PyTorch MLP for tabular classification with early stopping
https://github.com/kianaabrisham/mlp-pytorch-classifier
binary-classification deep-learning early-stopping mlp pytorch reproducibility tabular-data
Last synced: about 1 month ago
JSON representation
PyTorch MLP for tabular classification with early stopping
- Host: GitHub
- URL: https://github.com/kianaabrisham/mlp-pytorch-classifier
- Owner: KianaAbrisham
- License: mit
- Created: 2025-09-30T15:08:11.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T15:08:39.000Z (9 months ago)
- Last Synced: 2025-09-30T21:27:54.817Z (9 months ago)
- Topics: binary-classification, deep-learning, early-stopping, mlp, pytorch, reproducibility, tabular-data
- Language: Jupyter Notebook
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyTorch MLP Classifier (Tabular) — Portfolio Sample
This repository shows a **multilayer perceptron (MLP)** in **PyTorch** for binary classification on tabular data.
It uses a clean training loop (with early stopping), metric tracking, and neat plots (loss & accuracy).
## What this demonstrates
- PyTorch **Dataset/DataLoader** for CSV tabular data
- MLP with **batch norm** and **dropout**
- Training loop with **early stopping** and model checkpointing
- Evaluation: accuracy, precision/recall/F1, confusion matrix
- Reproducible notebook with clear narrative
## Structure
```
.
├── notebooks
│ └── mlp_tabular.ipynb # End-to-end training & eval with plots
├── src
│ └── data_utils.py # CSVDataset + helpers
│ └── model.py # Simple MLP
├── data
│ └── sample.csv # Tiny demo CSV (features f1..f10, label)
├── README.md
├── requirements.txt
├── LICENSE
└── .gitignore
```
## Quickstart
```bash
python -m venv .venv
# Windows: .venv\Scripts\activate
# Linux/Mac: source .venv/bin/activate
pip install -r requirements.txt
jupyter notebook notebooks/mlp_tabular.ipynb
```
### Use your own data
- Provide a CSV with numeric feature columns and a `label` column (0/1).
- Update the `csv_path` cell in the notebook and run all cells.
## License
MIT