Exploratory Data Analysis & Unsuperivsed Learning M1-DAS Lecturer: HAS Sothea, PhD
Objective: Preprocessing is important in data related tasks. In this TP, you will explore different challanges you may encounted during when performing data preprocessing. We will discuss reasonable solution to these challanges.
The Titanic dataset contains information on the passengers aboard the RMS Titanic, which sank in \(1912\). It includes details like age, gender, class, and survival status.
I bet you have heard about or watched Tiannic movie at least once. How about we take a look at the real dataset of Titanic available in Kaggle. For more information about the dataset and the columns, read Titanic dataset. Let’s import it into our Jupyter Notebook by running the following code.
A. What’s the dimension of this dataset? How many quantitative and qualitative variables are there in this dataset (read about the data here)?
# To do
B. Are there any missing values? If so,
Study the impact of missing value removal on the quantitative variables.
Study the impact of missing value removal on the qualitative variables.
Conclude the dynamic of the missing values and handle them.
# To do
C. What are the most common passenger names? Were Rose and Jack on the ship?
Hint: WordCloud is a useful graph for such text summary. For more, read here.
2. Bivariate/Multivariate Analysis
We are primarily interested in exploring the relationship between each column and the likelihood of passenger survival. The following questions will guide you through this exploration. In each question, try to give some comments on what you observe in the graphs.
A. Survival Analysis: How did the survival rates vary by gender? How about by class?
Hint: Create bar charts or stacked bar charts showing the survival rates for different genders and different passenger classes.
# To do
B. Fare and Survival: Is there a relationship between the fare paid and the likelihood of survival?
Hint: Create boxplots to analyze the fare distribution among survivors and non-survivors.
# To do
C. Family Size: How does family size (number of siblings/spouses and parents/children) impact the chances of survival?
# To do
D. Embarkation Points: How do survival rates differ based on the port of embarkation (C, Q, S)?
# To do
E. Pclass and Age: How does passenger class correlate with age?
# To do
F. Gender and Age: How does age distribution differ between male and female passengers?
# To do
G. Age, Fare and Gender: View the connection of Age, Fare and Gender in one graph.
# To do
H. Age, Fare and Class: View the connection of Age, Fare and Class in one graph.
# To do
I. Based on your analysis, which variables appear to have the greatest impact on the likelihood of survival?