コホート指標

Pythonで学ぶカスタマーセグメンテーション

Karolis Urbonas

Head of Data Science, Amazon

顧客維持: cohort_counts テーブル

  • cohort_counts テーブルで各コホートの初期顧客数は?

$$

customer_counts_retention_1

Pythonで学ぶカスタマーセグメンテーション

顧客維持: cohort_counts テーブル

  • 各コホートの初期顧客数は?
  • その後の各月のアクティブ顧客は?

customer_retention_2

Pythonで学ぶカスタマーセグメンテーション

維持率を計算

  1. 最初の列を cohort_sizes として保存
    cohort_sizes = cohort_counts.iloc[:,0]
    
  2. cohort_counts の各値を cohort_sizes で割る
    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...