This is a tutorial in an IPython Notebook for the Kaggle competition, Titanic Machine Learning From Disaster. The goal of this repository is to provide an example of a competitive analysis for those interested in getting into the field of data analytics or using python for Kaggle's Data Science competitions .
Quick Start: View a static version of the notebook in the comfort of your own web browser.
To run this notebook interactively:
- Download this repository in a zip file by clicking on this link or execute this from the terminal:
git clone https://github.com/agconti/kaggle-titanic.git
- Install virtualenv.
- Navigate to the directory where you unzipped or cloned the repo and create a virtual environment with
virtualenv env
. - Activate the environment with
source env/bin/activate
- Install the required dependencies with
pip install -r requirements.txt
. - Execute
ipython notebook
from the command line or terminal. - Click on
Titanic.ipynb
on the IPython Notebook dasboard and enjoy! - When you're done deactivate the virtual environment with
deactivate
.
The sinking of the RMS Titanic is one of the most infamous shipwrecks in history. On April 15, 1912, during her maiden voyage, the Titanic sank after colliding with an iceberg, killing 1502 out of 2224 passengers and crew. This sensational tragedy shocked the international community and led to better safety regulations for ships.
One of the reasons that the shipwreck led to such loss of life was that there were not enough lifeboats for the passengers and crew. Although there was some element of luck involved in surviving the sinking, some groups of people were more likely to survive than others, such as women, children, and the upper-class.
In this contest, we ask you to complete the analysis of what sorts of people were likely to survive. In particular, we ask you to apply the tools of machine learning to predict which passengers survived the tragedy.
This Kaggle Getting Started Competition provides an ideal starting place for people who may not have a lot of experience in data science and machine learning."
From the competition homepage.
Show a simple example of an analysis of the Titanic disaster in Python using a full complement of PyData utilities. This is aimed for those looking to get into the field or those who are already in the field and looking to see an example of an analysis done with Python.
- Importing Data with Pandas
- Cleaning Data
- Exploring Data through Visualizations with Matplotlib
- Supervised Machine learning Techniques: + Logit Regression Model + Plotting results + Support Vector Machine (SVM) using 3 kernels + Basic Random Forest + Plotting results
- K-folds cross validation to valuate results locally
- Output the results from the IPython Notebook to Kaggle
To find the basic scripts for the competition benchmarks look in the "Python Examples" folder. These scripts are based on the originals provided by Astro Dave but have been reworked so that they are easier to understand for new comers.
Competition Website: http://www.kaggle.com/c/titanic-gettingStarted