An open API service indexing awesome lists of open source software.

https://github.com/shervinnd/titanic-survival-predictor

🚒 Dive into the Titanic dataset with this ML project! Using TensorFlow, predict passenger survival via neural networks. Features data preprocessing, model training, and visualization with pandas, scikit-learn, and matplotlib. Perfect for beginners in deep learning. πŸ“ŠπŸ’»
https://github.com/shervinnd/titanic-survival-predictor

classification data-preprocessing data-science data-visualization deep-learning jupyter-notebook machine-learning neural-network pandas predictive-modeling python scikit-learn tensorflow titanic-dataset

Last synced: 27 days ago
JSON representation

🚒 Dive into the Titanic dataset with this ML project! Using TensorFlow, predict passenger survival via neural networks. Features data preprocessing, model training, and visualization with pandas, scikit-learn, and matplotlib. Perfect for beginners in deep learning. πŸ“ŠπŸ’»

Awesome Lists containing this project

README

          

# Titanic Survival Predictor 🚒πŸ’₯

![Titanic
Banner](https://img.shields.io/badge/Project-Titanic%20Survival%20Predictor-blue?style=for-the-badge&logo=ship)

![Python](https://img.shields.io/badge/Python-3.12-brightgreen?style=flat&logo=python)

![TensorFlow](https://img.shields.io/badge/TensorFlow-2.x-orange?style=flat&logo=tensorflow)

![License](https://img.shields.io/badge/License-MIT-green?style=flat)

Welcome to the **Titanic Survival Predictor** project! 🌊 This Jupyter
Notebook-based machine learning model dives into the historic Titanic
dataset to predict passenger survival using neural networks. Whether
you're a data science newbie or a seasoned sailor in ML waters, this
project is your ticket to exploring predictive modeling with a dash of
history! πŸ“œ

## Overview πŸ“Š

The Titanic disaster of 1912 is one of history's most infamous events.
In this project, we use the famous Titanic dataset to build a deep
learning model that predicts whether a passenger survived based on
features like age, sex, class, and more.

- **Goal**: Predict survival (0 = Did not survive 😒, 1 = Survived πŸŽ‰)
using a neural network built with TensorFlow/Keras.
- **Dataset**: Sourced from Kaggle's Titanic challenge (via GitHub raw
URL).
- **Tech Stack**: Python, Pandas, NumPy, Matplotlib, Scikit-learn,
TensorFlow.
- **Why Fun?**: It's a classic ML problem with real-world data
insights -- who survived and why? πŸš€

## Features ✨

- **Data Loading & Exploration**: Load the Titanic dataset and peek
into its structure πŸ”.
- **Preprocessing**: Handle missing values, encode categorical
variables (e.g., Sex, Embarked), and scale features for optimal
model performance πŸ“ˆ.
- **Neural Network Model**: Build and train a TensorFlow/Keras model
to predict survival 🧠.
- **Visualization**: Plot key insights using Matplotlib to understand
data distributions πŸ“Š.
- **Scalable Workflow**: Easily adaptable for further experimentation
or hyperparameter tuning βš™οΈ.

## Getting Started πŸš€

### Prerequisites

To run this project, you'll need:

- Python 3.12+ 🐍
- Jupyter Notebook πŸ““
- Libraries: Install via `pip install -r requirements.txt` or
manually:
- `pandas`
- `numpy`
- `matplotlib`
- `scikit-learn`
- `tensorflow`

### Installation

1. Clone this repository:

``` bash
git clone https://github.com/shervinnd/titanic-survival-predictor.git
```

2. Navigate to the project directory:

``` bash
cd titanic-survival-predictor
```

3. Install dependencies:

``` bash
pip install -r requirements.txt
```

4. Launch Jupyter Notebook:

``` bash
jupyter notebook Titanic.ipynb
```

### Dataset

The dataset is sourced directly from:

https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv

It includes features like:

- `PassengerId`, `Survived`, `Pclass`, `Sex`, `Age`, `SibSp`, `Parch`,
`Fare`, `Embarked`
- Preprocessing steps handle missing values (`Age`, `Embarked`) and
drop irrelevant columns (`Name`, `Ticket`, `Cabin`).

## Usage πŸ› οΈ

1. Open `Titanic.ipynb` in Jupyter Notebook.
2. Run the cells sequentially to:
- Load and preprocess the data 🧹.
- Build and train the neural network 🧠.
- Evaluate model performance πŸ“Š.
3. Experiment with hyperparameters or feature engineering to improve
accuracy 🚧.

## Project Structure πŸ“‚

- `Titanic.ipynb`: Main Jupyter Notebook with data processing, model
training, and evaluation.
- `README.md`: This file, your guide to the project! πŸ“–
- `requirements.txt`: List of required Python libraries.

## Future Improvements 🌟

- Add feature engineering (e.g., family size, title extraction) πŸ› οΈ.
- Experiment with other models (e.g., Random Forest, XGBoost) 🌳.
- Implement cross-validation for robust evaluation βœ….
- Visualize predictions with confusion matrices or ROC curves πŸ“ˆ.

## License πŸ“œ

This project is licensed under the MIT License. See the LICENSE file for
details.

## Acknowledgments πŸ™Œ

- Kaggle for providing the Titanic dataset.
- TensorFlow and Scikit-learn communities for awesome tools.
- The data science community for endless inspiration! 🌍

*Powered by Miracle⚑*