Python 的行銷機器學習
Karolis Urbonas
Head of Analytics & Science, Amazon
使用第 1 個月的值計算各同批次規模
cohort_sizes = cohort_counts.iloc[:,0]
將每月活躍人數除以初始規模求留存,並推得流失
retention = cohort_counts.divide(cohort_sizes, axis=0)
churn = 1 - retention
以熱度圖繪製留存值
sns.heatmap(retention, annot=True, vmin=0, vmax=0.5, cmap="YlGn")
Python 的行銷機器學習