Skip to content

This project implements a machine learning model to predict the survival of passengers aboard the Titanic using the Titanic dataset. The model utilizes various preprocessing techniques and logistic regression to make predictions based on passenger characteristics.

Notifications You must be signed in to change notification settings

mohitkumhar/titanic_survival_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Titanic Survival Prediction

This project implements a machine learning model to predict the survival of passengers aboard the Titanic using the Titanic dataset. The model utilizes various preprocessing techniques and logistic regression to make predictions based on passenger characteristics.

Project Overview

The Titanic dataset is a well-known dataset in data science and machine learning communities. It contains information about passengers, including their class, age, gender, fare, and other attributes. The goal of this project is to predict whether a passenger survived or not based on these features.

Features

  • Data Preprocessing: Handling missing values, outlier removal, and feature engineering (e.g., extracting titles from names and calculating family size).
  • Machine Learning Pipeline: Utilizes scikit-learn for building a robust pipeline that includes data preprocessing and model training.
  • Logistic Regression: Implements logistic regression for binary classification of survival.
  • Model Evaluation: Uses accuracy score and cross-validation to assess model performance.
  • Model Serialization: Saves the trained model using pickle for future predictions. image

Technologies Used

  • Python
  • pandas
  • NumPy
  • scikit-learn
  • Matplotlib
  • Seaborn
  • Flask (for the web form, if applicable)

Installation

To run this project locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/mohitkumhar/titanic_survival_prediction/
  2. Navigate to the project directory:
    cd titanic_survival_prediction
  3. Install the required packages:
    pip install -r ./requirements.txt

Usage

  1. Run the model training script to create and save the prediction model:
    jupyter notebook model_training_code/main.ipynb
  2. To use the web input method, run the Flask app:
    python app.py
  3. Open your web browser and navigate to http://127.0.0.1:5000 to access the prediction form.

Contributing

Contributions are welcome! If you would like to contribute to this project, please fork the repository, create a new branch, and submit a pull request. Any improvements, suggestions, or bug fixes are appreciated!

Acknowledgments

  • The Titanic dataset is provided by Kaggle.
  • Special thanks to the data science community for their contributions to tutorials and resources.

About

This project implements a machine learning model to predict the survival of passengers aboard the Titanic using the Titanic dataset. The model utilizes various preprocessing techniques and logistic regression to make predictions based on passenger characteristics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published