Skip to content

simR122/survive-the-titanic

Repository files navigation

Survive the Titanic 🚢

Welcome to the Survive the Titanic project! This project predicts the survival chances of Titanic passengers using machine learning models. It integrates data ingestion, processing, model training, and deployment into a seamless pipeline.


🚀 Technologies Used

Python Flask Redis PostgreSQL Scikit-learn Prometheus Grafana Docker Apache Airflow


📂 Project Structure

application.py          # Flask application for predictions
config/                 # Configuration files for database and paths
dags/                   # Airflow DAGs for data extraction and transformation
notebook/               # Jupyter notebooks for exploratory data analysis
pipeline/               # Training pipeline scripts
src/                    # Core source code for data processing, training, and logging
static/                 # Static files (CSS)
templates/              # HTML templates for the web app
artifacts/              # Generated models and raw data

🛠️ Features

  • Data Ingestion: Extracts Titanic data from PostgreSQL and stores it in Redis.
  • Data Processing: Handles missing values, feature engineering, and data balancing.
  • Model Training: Trains a Random Forest model with hyperparameter tuning.
  • Web Application: Flask-based app for survival prediction.
  • Monitoring: Prometheus and Grafana for metrics and visualization.
  • Orchestration: Apache Airflow for pipeline automation.

🏗️ How to Run

  1. Clone the Repository:

    git clone <repository-url>
    cd survive-the-titanic
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Run the Flask Application:

    python application.py
  4. Access the Web App: Open your browser and navigate to http://localhost:5000.

  5. Start Monitoring:

    • Prometheus: http://localhost:9090
    • Grafana: http://localhost:3000 (Default credentials: admin/admin)

📊 Example Prediction

  1. Fill in the passenger details on the web form.
  2. Click Predict.
  3. View the survival prediction result.

📜 License

This project is licensed under the MIT License.

About

End-to-end pipeline of User Survival Prediction on the Titanic dataset using Astro (Airflow), SQL, Redis, Grafana, and Prometheus

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors