Skip to content

OpenData4Sciece/LogisticRegressionMLPipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logistic Regression ML Pipeline with FastAPI 🚀

A clean and modern ML microservice for logistic regression (GLM) using FastAPI. This project was built with scalability, explainability, and deployability in mind. Enjoy!

🔧 Project Structure

logistic-regression-fastapi/
│
├── app/
│   ├── main.py           # FastAPI app entrypoint
│   ├── model.py          # Model loading and prediction logic
│   └── schemas.py        # Pydantic request/response models
│
├── models/
│   └── logistic_model.joblib   # Pretrained logistic regression model
│
├── notebooks/
│   └── train_model.ipynb       # Jupyter notebook for training and evaluation
│
├── Dockerfile           # Containerisation setup
└── requirements.txt     # Python dependencies

🧪 Training

The notebooks/train_model.ipynb trains a simple logistic regression classifier and exports the model.

▶️ Run API

uvicorn app.main:app --reload

🐳 Docker

docker build -t logistic-api .
docker run -d -p 8000:8000 logistic-api

✨ Author

Pierre-Henry Soria

Made with ❤️ by Pierre-Henry Soria — an AI Data Scientist & Senior Software Engineer. Incredibly passionate about AI, machine learning, data science, and emerging technologies. I could happily talk all night about programming and IT with anyone who’s keen. Roquefort 🧀, ristretto ☕️, and dark chocolate lover! 😋

@phenrysay GitHub YouTube BlueSky