Exercise

Fill dummy values

Similar to how you tried to find any relation of missing to missing values between columns, it is also important to find any relation of missing to non-missing values between columns. This will help you realize any factors for missingness in the data.

BMI vs Serum Insulin

In the above figure, you can observe that the missing values of Serum Insulin are spread across the range of BMI values. This only implies that there is no relation!

In this exercise, you will write a function to generate dummy values to help create the above scatter plot (in the next exercise). The operations to generate dummy values involve scaling the random values to a column range with a scaling factor and shifting the values.

The function rand() has been imported for you from numpy.random.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Calculate the column range by subtracting maximum and minimum values of the column.