Install
openclaw skills install sales-forecast-pkgAI销量预测助手。基于 Amazon Chronos-2 (120M) 零样本时序大模型,输入历史销量数据(CSV/Excel),自动生成多分位数概率预测、置信区间和交互式HTML可视化报告。当用户询问销量预测、销售预测、趋势预测、时序预测时使用。
openclaw skills install sales-forecast-pkg基于 Amazon Chronos-2 零样本时序大模型(120M 参数),零训练、开箱即用的销量预测工具。
CSV 文件至少包含两列:日期和时间序列数值。
timestamp,sales
2024-01-01,245
2024-01-02,238
2024-01-03,252
# 安装依赖
pip install chronos-forecasting pandas plotly openpyxl
# 运行预测(预测未来 30 期)
python3 {baseDir}/scripts/forecast.py \
--input sales.csv \
--output results/ \
--prediction-length 30 \
--quantiles 0.1,0.5,0.9
# 生成 HTML 报告
python3 {baseDir}/scripts/report_gen.py \
--data results/forecast_data.json \
--output report.html
| 参数 | 说明 | 默认值 |
|---|---|---|
-i, --input | 输入数据文件路径 | 必填 |
-o, --output | 输出目录 | 必填 |
-p, --prediction-length | 预测步数 | 30 |
-q, --quantiles | 分位数(逗号分隔) | 0.1,0.5,0.9 |
-c, --context-length | 最大上下文长度 | 2048 |
--hf-endpoint | HuggingFace 镜像地址 | hf-mirror.com |
| 参数 | 说明 | 默认值 |
|---|---|---|
-d, --data | forecast_data.json 路径 | 必填 |
-o, --output | 输出 HTML 文件路径 | 必填 |
HF_ENDPOINT=https://hf-mirror.com