cohort-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cohort Analysis

Cohort分析

Analyze retention and behavior patterns by grouping users into cohorts - understand how different customer groups behave over time.
通过将用户划分为群组(Cohort)来分析留存率和行为模式——了解不同客户群体随时间的行为变化。

When to Use This Skill

何时使用该技能

  • Retention tracking - Measure how users stick around over time
  • Acquisition analysis - Compare cohorts from different channels
  • Product changes - Measure impact on user behavior
  • Churn prediction - Identify at-risk cohorts
  • LTV estimation - Project customer lifetime value
  • 留存跟踪 - 衡量用户的长期留存情况
  • 获客分析 - 对比不同渠道的用户群组
  • 产品变更评估 - 衡量产品变化对用户行为的影响
  • 流失预测 - 识别高风险用户群组
  • 生命周期价值(LTV)估算 - 预测客户终身价值

What Claude Does vs What You Decide

Claude的职责与你的决策

Claude DoesYou Decide
Structures analysis frameworksMetric definitions
Identifies patterns in dataBusiness interpretation
Creates visualization templatesDashboard design
Suggests optimization areasAction priorities
Calculates statistical measuresDecision thresholds
Claude的工作你的决策
构建分析框架定义指标
识别数据中的模式业务解读
创建可视化模板仪表盘设计
提出优化方向建议确定行动优先级
计算统计指标设置决策阈值

Dependencies

依赖项

bash
pip install pandas plotly click
bash
pip install pandas plotly click

Commands

命令

Retention Analysis

留存分析

bash
python scripts/main.py retention data.csv --date-col signup --event-col purchase
python scripts/main.py retention data.csv --date-col signup --periods week
bash
python scripts/main.py retention data.csv --date-col signup --event-col purchase
python scripts/main.py retention data.csv --date-col signup --periods week

Visualize Cohorts

可视化群组数据

bash
python scripts/main.py visualize cohorts.csv --output retention_chart.html
bash
python scripts/main.py visualize cohorts.csv --output retention_chart.html

Export Report

导出报告

bash
python scripts/main.py report data.csv --date-col signup --event-col active --output report.html
bash
python scripts/main.py report data.csv --date-col signup --event-col active --output report.html

Examples

示例

Example 1: Analyze User Retention

示例1:分析用户留存率

bash
python scripts/main.py retention users.csv --date-col signup_date --event-col last_active
bash
python scripts/main.py retention users.csv --date-col signup_date --event-col last_active

Output:

输出:

Cohort Retention Analysis

Cohort Retention Analysis

──────────────────────────────────

──────────────────────────────────

Cohort Users M1 M2 M3 M4

Cohort Users M1 M2 M3 M4

Jan 2024 1,234 65% 48% 42% 38%

Jan 2024 1,234 65% 48% 42% 38%

Feb 2024 1,456 62% 45% 41% --

Feb 2024 1,456 62% 45% 41% --

Mar 2024 1,321 68% 52% -- --

Mar 2024 1,321 68% 52% -- --

Apr 2024 1,567 64% -- -- --

Apr 2024 1,567 64% -- -- --

Avg Retention: 65% → 48% → 42% → 38%

Avg Retention: 65% → 48% → 42% → 38%

Best Cohort: Mar 2024 (68% M1)

Best Cohort: Mar 2024 (68% M1)

undefined
undefined

Example 2: Generate Visual Report

示例2:生成可视化报告

bash
python scripts/main.py report transactions.csv \
  --date-col signup \
  --event-col purchase_date \
  --output retention_report.html
bash
python scripts/main.py report transactions.csv \
  --date-col signup \
  --event-col purchase_date \
  --output retention_report.html

Generates interactive HTML with:

生成包含以下内容的交互式HTML:

- Retention heatmap

- 留存率热力图

- Cohort size chart

- 群组规模图表

- Trend analysis

- 趋势分析

undefined
undefined

Cohort Table Format

群组表格格式

CohortSizePeriod 0Period 1Period 2Period 3
2024-011234100%65%48%42%
2024-021456100%62%45%-
2024-031321100%68%--
CohortSizePeriod 0Period 1Period 2Period 3
2024-011234100%65%48%42%
2024-021456100%62%45%-
2024-031321100%68%--

Skill Boundaries

技能边界

What This Skill Does Well

该技能擅长的领域

  • Structuring data analysis
  • Identifying patterns and trends
  • Creating visualization frameworks
  • Calculating statistical measures
  • 结构化数据分析
  • 识别数据模式与趋势
  • 创建可视化框架
  • 计算统计指标

What This Skill Cannot Do

该技能无法完成的任务

  • Access your actual data
  • Replace statistical expertise
  • Make business decisions
  • Guarantee prediction accuracy
  • 访问你的实际数据
  • 替代专业统计知识
  • 做出业务决策
  • 保证预测准确性

Related Skills

相关技能

  • ab-test-stats - Test retention experiments
  • funnel-analyzer - Analyze conversion funnels
  • ab-test-stats - 测试留存实验
  • funnel-analyzer - 分析转化漏斗

Skill Metadata

技能元数据

  • Mode: centaur
yaml
category: analytics
subcategory: retention
dependencies: [pandas, plotly]
difficulty: intermediate
time_saved: 4+ hours/week
  • 模式: centaur
yaml
category: analytics
subcategory: retention
dependencies: [pandas, plotly]
difficulty: intermediate
time_saved: 4+ hours/week