เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

การพยากรณ์ด้วย Logistic Regression

เช่นเดียวกับ Linear Regression ข้อดีของ Logistic Regression คือสามารถนำไปพยากรณ์ได้ ลองทบทวนขั้นตอนการพยากรณ์กันอีกครั้ง!

churn และ mdl_churn_vs_both_inter พร้อมใช้งานแล้ว รวมถึง itertools.product ที่โหลดไว้เรียบร้อยแล้ว

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Regression ระดับกลางด้วย statsmodels ใน Python

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# 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)
แก้ไขและรันโค้ด