Titanic Survival Prediction using Machine Learning

This project predicts the survival of passengers aboard the Titanic using machine learning models. It was developed and executed in Google Colab using the Kaggle Titanic dataset.

Project Overview

The goal of this project is to predict whether a passenger survived the Titanic disaster based on features like age, gender, ticket class, and more. It includes data preprocessing, model training, and evaluation using machine learning algorithms.

Dataset

The dataset used is from the Titanic Kaggle competition and includes:

  • Pclass (Passenger class)
  • Name, Sex, Age
  • SibSp, Parch (Family aboard)
  • Fare, Embarked (Port of embarkation)

The target variable is Survived, where 0 indicates the passenger did not survive, and 1 indicates they did.

Steps

  1. Data Preprocessing: Cleaning and preparing the dataset for model training.
  2. Modeling: Several machine learning models like Logistic Regression and Random Forest are used to predict survival.
  3. Evaluation: Models are evaluated based on accuracy and other metrics.

How to Run

To run this project:

  1. Open the Google Colab Notebook.
  2. Ensure you have access to the Titanic dataset from Kaggle.
  3. Run the cells in the notebook to preprocess the data, train models, and view predictions.

Models Used

  • Logistic Regression
  • Random Forest
  • Support Vector Machine (SVM)
  • K-Nearest Neighbors (KNN)

Results

After training and testing the models, the best-performing model will be highlighted in the notebook.