Session Ready
Exercise

Logistic regression prediction

As with linear regression, the joy of logistic regression is that you can make predictions. Let's step through the prediction flow one more time!

churn and mdl_churn_vs_both_inter are available; itertools.product is loaded.

Instructions 1/2
undefined XP
  • 1
  • 2

Create a DataFrame explanatory_data of all combinations of these explanatory variables:

  • Set time_since_first_purchase to a sequence from minus two to four in steps of 0.1.
  • Set time_since_last_purchase to a sequence from minus one to six in steps of 0.1.

Name the columns of explanatory_data to time_since_first_purchase and time_since_last_purchase.