Member-only story
Titanic Survival Prediction Using Machine Learning
Would you have survived the Titanic?

The RMS Titanic was known as the unsinkable ship and was the largest, most luxurious passenger ship of its time. Sadly, the British ocean liner sank on April 15, 1912, killing over 1500 people while just 705 survived.
In this article, we will analyze the Titanic data set and make two predictions. One prediction to see which passengers on board the ship would survive and then another prediction to see if we would’ve survived.
Data Set Column Descriptions
- pclass: Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd)
- survived: Survival (0 = No; 1 = Yes)
- name: Name
- sex: Sex
- age: Age
- sibsp: Number of siblings/spouses aboard
- parch: Number of parents/children aboard
- fare: Passenger fare (British pound)
- embarked: Port of embarkation (C = Cherbourg; Q = Queenstown; S = Southampton)
- adult_male: A male 18 or older (0 = No, 1=Yes)
- deck: Deck of the ship
- who: man (18+), woman (18+), child (<18)
- alive: Yes, no
- embarked_town: Port of embarkation ( Cherbourg, Queenstown, Southampton)
- class: Passenger class (1st; 2nd; 3rd)
- alone: 1= alone, 0= not alone ( you have at least 1 sibling, spouse, parent or child on board)
age
Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5
sibsp
The dataset defines family relations in this way:
- Sibling= brother, sister, stepbrother, stepsister
- Spouse= husband, wife (mistresses and fiancés were ignored)
parch
The dataset defines family relations in this way:
- Parent= mother, father
- Child= daughter, son, stepdaughter, stepson
Some children traveled only with a nanny, therefore parch=0 for them.