Learn practical skills, build real-world projects, and advance your career

MA_00079563_yvu84f.jpg

1. Introduction

2. Domain information

Titanic was a British passenger liner operated by the White Star Line. Titanic was on its way from Southampton to New York City when it sank in the North Atlantic Ocean in the early morning hours of 15 April 1912 after Titanic collided with an iceberg. The ship carried 2224 people, considering passengers and crew aboard,1514 of them died.

Titanic carried 16 wooden lifeboats and four collapsibles, which could accommodate 1,178 people, only one-third of Titanic's total capacity (and 53% of real number of passengers). At the time, lifeboats were intended to ferry survivors from a sinking ship to a rescuing ship—not keep afloat the whole population or power them to shore. If the SS Californian would responded to Titanic's distress calls, the lifeboats may have been adequate to ferry the passengers to safety as planned, but it didn't happen and the only way to survive were to get on the lifeboat.

The main question of the competition is “what sorts of people were more likely to survive?”

3. Loading libraries:

List of libraries I am using in this kernel:

  • pandas - offers data structures and operations for manipulating numerical tables and time series. (imported as pd) Documentation
  • seaborn - data visualization library based on matplotlib. Documentation
  • matplotlib.pyplot - to create some visualizations (imported as plt) Documentation
  • numpy - The fundamental package for scientific computing with Python. Documentation
import warnings
warnings.simplefilter('ignore')
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np