Answered step by step
Verified Expert Solution
Question
1 Approved Answer
we saw that it is possible to replace or impute missing data based on simple population statistics such as the mean, median or mode
we saw that it is possible to replace or impute missing data based on simple population statistics such as the mean, median or mode of the targeted feature. When a friend of yours hears that you are imputing the Age column by simply taking the mean or median of the non-missing data, she decides to show-off the following code which produces two telling plots plt.figure(figsize-(15,5)) plt.subplot (1, 2, 1) sns.boxenplot(train_df['Pclass'], train_df['Age'], hue-train_df[ 'Survived']) plt.subplot (1, 2, 2) sns.boxenplot (train_df [ 'Sex'], train_df[ 'Age'], hue-train_df[ 'Survived']) plt.show() 80 60 Survived 0 1 80 60 40 WWW Survived 0 1
Step by Step Solution
★★★★★
3.52 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
Your friends code is using Pythons seaborn library to create two boxen plots The first pl...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started