?? Day94 of #100DaysOfPython ??

?? Day94 of #100DaysOfPython ??

Today, we're diving into another technique for handling missing values known as Random Sample Imputation!



  • Random sample imputation aims to impute the null values with a random observation from the dataset
  • It assumes that the observations in the dataset are missing completely at random (MCAR)



Checkout more techniques on handling missing values!

Let's dive into an example on imputing missing observations in the feature through a randomly picked sample:

Link to titanic dataset



Interpretation of the plot:

In case of imputing missing values in the Age feature with median values it was observed that the standard deviation changed from 14.5 to 13 and most of the observations are close to the median (represented by blue line). The disadvantage of this is that it leads a change in variance of the dataset and distorts the data distribution.

However, in case of imputing the missing observations in the Age feature with randomly picked values, there is almost no change in standard deviation and the distribution of the data leading to no change in variance. Represented by Red & Green line in the plot.

Advantage:



  • No distortion in variance



Disadvantage:



  • Random sampling is not suitable for all business cases


要查看或添加评论,请登录

Surya Singh的更多文章

  • ?? Day100 of #100DaysOfPython ??

    ?? Day100 of #100DaysOfPython ??

    Today, we're diving into map(), filter(), & reduce() in python! map() The map() function in Python is used to apply a…

    2 条评论
  • ?? Day99 of #100DaysOfPython ??

    ?? Day99 of #100DaysOfPython ??

    Today, we're diving into 'is' & '==' in python! The 'is' and '==' operators might seem similar at first glance, but…

  • ?? Day98 of #100DaysOfPython ??

    ?? Day98 of #100DaysOfPython ??

    Today, we're diving into the use of .join() function for string concatenation in python! The .

  • ?? Day97 of #100DaysOfPython ??

    ?? Day97 of #100DaysOfPython ??

    Today, we're continuing to dive into Object Oriented Programming in python! How do we initialise a class and create…

  • ?? Day96 of #100DaysOfPython ??

    ?? Day96 of #100DaysOfPython ??

    Today, we're diving into Object Oriented Programming in python! What is a class? A class is a blueprint for creating…

  • ?? Day95 of #100DaysOfPython ??

    ?? Day95 of #100DaysOfPython ??

    Today, we're diving into regex in python! Regex allows you to define search patterns for strings, making it easier to…

  • ?? Day93 of #100DaysOfPython ??

    ?? Day93 of #100DaysOfPython ??

    Today, we're diving into Local & Global variables in python! Local variables are defined within a function or block and…

  • ?? Day92 of #100DaysOfPython ??

    ?? Day92 of #100DaysOfPython ??

    Today, we're diving into the use of .join() function for string concatenation in python! The .

  • ?? Day91 of #100DaysOfPython ??

    ?? Day91 of #100DaysOfPython ??

    Today, we're diving into Count/Frequency Encoding for handling categorical feature! Count or frequency encoding is a…

  • ?? Day90 of #100DaysOfPython ??

    ?? Day90 of #100DaysOfPython ??

    Today, we're diving into dictionary vs. sets in python! Dictionaries are unordered collections of key-value pairs…

社区洞察

其他会员也浏览了