Exercise

Meaning of evolution

In this exercise you will investigate the link between the variable "donations2017min_2016" that you added to the basetable in the previous exercises and the target, using a predictor insight graph.

For your convenience, the methods to create the predictor insight graph are pre-programmed.

To plot the predictor insight graph of a continuous variable variable in a basetable, you can follow these steps:

  • Discretize the variable in n_bins bins:
basetable["variable_disc"] = pd.qcut(basetable["variable"], n_bins)
  • Construct the predictor insight graph table:
pig_table = create_pig_table(basetable, "target","variable_disc")
  • Plot the predictor insight graph based on this table:
plot_pig(pig_table,"variable_disc")

Instructions

100 XP
  • Discretize the evolution variable donations_2017_min_2016 in 5 bins and add it to the basetable.
  • Create the predictor insight graph table for this variable.
  • Plot the predictor insight graph of this variable.