羅吉斯回歸預測
就像線性回歸一樣,羅吉斯回歸的重點在於可以用來做預測。讓我們再走一次完整的預測流程吧!
churn 與 mdl_churn_vs_both_inter 已可使用;itertools.product 已載入。
本練習屬於課程
使用 Python 的 statsmodels 進行迴歸分析:中級
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# 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)