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.
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.
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.
- Data Preprocessing: Cleaning and preparing the dataset for model training.
- Modeling: Several machine learning models like Logistic Regression and Random Forest are used to predict survival.
- Evaluation: Models are evaluated based on accuracy and other metrics.
To run this project:
- Open the Google Colab Notebook.
- Ensure you have access to the Titanic dataset from Kaggle.
- Run the cells in the notebook to preprocess the data, train models, and view predictions.
- Logistic Regression
- Random Forest
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
After training and testing the models, the best-performing model will be highlighted in the notebook.