Predikce pomocí logistické regrese
Společně s lineární regresí patří logistická regrese k nástrojům, se kterými dokážeš dělat predikce. Projdeme si celý postup ještě jednou!
K dispozici máš churn a mdl_churn_vs_both_inter; načteno je také itertools.product.
Toto cvičení je součástí kurzu
Intermediate Regression with statsmodels in Python
Interaktivní cvičení na vyzkoušení si v praxi
Vyzkoušejte si toto cvičení dokončením tohoto ukázkového kódu.
# Create time_since_first_purchase
time_since_first_purchase = ____
# Create time_since_last_purchase
time_since_last_purchase = ____
# Create p as all combinations of values of time_since_first_purchase and time_since_last_purchase
p = ____
# Transform p to a DataFrame and name the columns
explanatory_data = ____
# Print the result
print(explanatory_data)