ltv-predictor
基于RFM模型和回归算法的客户生命周期价值(LTV)预测分析工具,支持电商和零售业务的客户价值预测。使用时需要客户交易数据、订单历史或消费记录,自动进行RFM特征工程、回归建模和价值预测。
npx skills add majiayu000/claude-skill-registry --skill ltv-predictor-liangdabiao-claude-data-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 客户生命周期价值预测技能 一个基于《数据分析咖哥十话》第3课理论的自动化LTV预测分析工具,提供从RFM特征工程到回归建模的完整解决方案。 ## ✨ 核心功能 ### 🔍 RFM特征工程 - **R值计算**: 最近一次消费时间间隔分析 - **F值计算**: 消费频率统计与分析 - **M值计算**: 消费金额汇总与分层 - **时间窗口**: 基于短期数据预测长期价值 - **客户分群**: 自动化客户价值分层 ### 🤖 回归算法建模 - **线性回归**: 基础回归分析模型 - **随机森林**: 高性能集成学习算法 - **模型对比**: 多算法性能评估比较 - **交叉验证**: 可靠的模型性能评估 - **超参数优化**: 自动化模型调参 ### 📊 LTV预测引擎 - **时间序列预测**: 基于历史数据预测未来LTV - **批量预测**: 支持大规模客户批量处理 - **置信区间**: 提供预测结果的不确定性评估 - **特征重要性**: 解释影响LTV的关键因素 ### 📈 可视化分析 - **RFM分布图**: 客户价值分布可视化 - **预测效果对比**: 实际值vs预测值散点图 - **特征重要性**: 关键特征贡献度分析 - **模型性能对比**: 多算法效果对比图 ### 📋 专业报告 - **HTML报告**: 交互式分析报告 - **Markdown文档**: 轻量级分析总结 - **Excel导出**: 便于业务部门使用 - **API接口**: 支持系统集成调用 ## 🚀 快速开始 ### 1. 环境安装 ```bash # 安装基础依赖 pip install pandas numpy scikit-learn matplotlib seaborn # 安装可选依赖(用于高级功能) pip install xgboost lightgbm joblib openpyxl ``` ### 2. 基础使用 ```python from scripts.ltv_predictor import LTVPredictor from scripts.data_processor import DataProcessor # 1. 初始化处理器 processor = DataProcessor() predictor = LTVPredictor() # 2. 加载和预处理数据 data = processor.load_order_data('your_orders.csv') rfm_data = processor.calculate_rfm_features(data, feature_period='3M', prediction_period='12M') # 3. 训练LTV预测模型 model_
- ✨ 核心功能
- 🔍 RFM特征工程
- 🤖 回归算法建模
- 📊 LTV预测引擎
- 📈 可视化分析
- 📋 专业报告
- 🚀 快速开始
- 1. 环境安装
- 2. 基础使用
- 3. 快速示例
- 📁 技能结构
- 🎯 应用场景
- 🛒 电商零售
- 💰 金融服务
pip install pandas numpy scikit-learn matplotlib seaborn pip install xgboost lightgbm joblib openpyxl
What does the ltv-predictor skill do?
基于RFM模型和回归算法的客户生命周期价值(LTV)预测分析工具,支持电商和零售业务的客户价值预测。使用时需要客户交易数据、订单历史或消费记录,自动进行RFM特征工程、回归建模和价值预测。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ltv-predictor-liangdabiao-claude-data-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
