Machine Learning สำหรับการตลาดด้วย Python
Karolis Urbonas
Head of Analytics & Science, Amazon
ใช้ค่าเดือนแรกเพื่อคำนวณขนาดของแต่ละ Cohort
cohort_sizes = cohort_counts.iloc[:,0]
คำนวณอัตราการรักษาโดยหารจำนวนผู้ใช้งานรายเดือนด้วยขนาดเริ่มต้น แล้วหาค่า Churn
retention = cohort_counts.divide(cohort_sizes, axis=0)
churn = 1 - retention
พล็อตค่าการรักษาลูกค้าในรูปแบบ Heatmap
sns.heatmap(retention, annot=True, vmin=0, vmax=0.5, cmap="YlGn")
Machine Learning สำหรับการตลาดด้วย Python