Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayushai/mlops-driven-titanic-survival-prediction-pipeline
This repository showcases a machine learning solution for predicting passenger survival on the Titanic using Scikit-Learn and Flask. The project demonstrates the use of a Scikit-Learn pipeline for efficient model training and preprocessing, and wraps the trained model in a Flask application to provide easy-to-use predictions via a web interface.
https://github.com/ayushai/mlops-driven-titanic-survival-prediction-pipeline
data-science dataan flask-application machine-learning pipelines
Last synced: 1 day ago
JSON representation
This repository showcases a machine learning solution for predicting passenger survival on the Titanic using Scikit-Learn and Flask. The project demonstrates the use of a Scikit-Learn pipeline for efficient model training and preprocessing, and wraps the trained model in a Flask application to provide easy-to-use predictions via a web interface.
- Host: GitHub
- URL: https://github.com/ayushai/mlops-driven-titanic-survival-prediction-pipeline
- Owner: AyushAI
- Created: 2023-08-31T15:37:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-24T07:50:13.000Z (5 months ago)
- Last Synced: 2025-02-01T21:17:24.806Z (8 days ago)
- Topics: data-science, dataan, flask-application, machine-learning, pipelines
- Language: Jupyter Notebook
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MLOps-Driven Titanic Survival Prediction Pipeline
## Overview
The Titanic Survival Prediction project aims to predict passenger survival on the Titanic using machine learning. This project leverages Scikit-Learn's powerful pipeline functionality to streamline the model development process and wraps the model into a Flask application for user-friendly predictions.
## Project Structure
- **`data/`**: Contains dataset files (e.g., training and test data).
- **`notebooks/`**: Jupyter notebooks for data exploration and preprocessing.
- **`src/`**: Source code for data processing, model training, and Flask application.
- **`pipeline.py`**: Contains Scikit-Learn pipeline configuration for preprocessing and model training.
- **`app.py`**: Flask application code for serving the model and handling user requests.
- **`requirements.txt`**: List of dependencies needed to run the project.
- **`README.md`**: Project overview and setup instructions.## Installation
To set up the project, clone the repository and install the required dependencies:
git clone https://github.com/yourusername/titanic-survival.git
cd titanic-survival
pip install -r requirements.txt## Usage
#Training the Model
1. Prepare the Data: Ensure the dataset files are located in the data/ directory.
2. Run the Pipeline: Execute the pipeline script to train the model. This will handle data preprocessing and model training.```bash
python src/pipeline.py
```
This will save the trained model and preprocessing pipeline to disk.#Running the Flask App
1. Start the Flask Server: Run the Flask application to serve the trained model and handle prediction requests.```bash
python src/app.py
```
2. Access the App: Open your web browser and navigate to http://127.0.0.1:5000. You can use the web interface to input passenger details and get survival predictions.#API Endpoints
1. POST /predict: Predict survival for a given passenger. Send a JSON payload with passenger data.Example Request:
```bash
json
{
"Pclass": 1,
"Sex": "female",
"Age": 29,
"SibSp": 0,
"Parch": 0,
"Fare": 71.2833,
"Embarked": "C"
}
```
Example Response:
```bash
json
{
"survival": 1
}
```
#Requirements
- Python 3.x
- Flask
- Scikit-Learn
- Pandas
- NumPyYou can install the required packages using:
```bash
pip install -r requirements.txt
```
#Contributing
Feel free to open issues or submit pull requests if you have suggestions or improvements.#License
This project is licensed under the MIT License. See the LICENSE file for details.Acknowledgements
Scikit-Learn for the machine learning pipeline.
Flask for the web application framework.Feel free to modify the content as needed, especially the placeholder URLs and paths. Let me know if there’s anything else you need!