分群指标

Python 中的客户细分

Karolis Urbonas

Head of Data Science, Amazon

客户留存:cohort_counts 表

  • cohort_counts 表中每个分群的初始客户数是多少?

$$

客户数量_留存_1

Python 中的客户细分

客户留存:cohort_counts 表

  • 每个分群最初有多少客户?
  • 之后各月仍活跃的有多少?

客户留存_2

Python 中的客户细分

计算留存率

  1. 将第一列保存为 cohort_sizes
    cohort_sizes = cohort_counts.iloc[:,0]
    
  2. cohort_sizes 除以 cohort_counts 表中的所有值
    retention = cohort_counts.divide(cohort_sizes, axis=0)
    
  3. 查看留存表
    retention.round(3) * 100
    
Python 中的客户细分

留存表

留存表

Python 中的客户细分

其他指标

grouping = online.groupby(['CohortMonth', 'CohortIndex'])

cohort_data = grouping['Quantity'].mean()
cohort_data = cohort_data.reset_index()
average_quantity = cohort_data.pivot(index='CohortMonth', columns='CohortIndex', values='Quantity')
average_quantity.round(1)
Python 中的客户细分

各分群的平均数量

平均数量

Python 中的客户细分

练习更多分群指标!

Python 中的客户细分

Preparing Video For Download...