Exercise

Feature exploration

Using the same Avazu dataset, you will explore how the values of device_type and banner_pos are distributed, as well as how CTR varies based on them.

Sample data in DataFrame form is loaded as df. The X and y variables that you created in the last exercise are available in your workspace. pandas as pd are also available in your workspace.

Instructions 1/2

undefined XP
  • 1
    • Find frequencies of values for each device_type with .value_counts().
    • Print the CTR within the sample by device_type.
  • 2
    • Find frequencies of values for each banner_pos using .value_counts().
    • Print the CTR within the sample by banner_pos.