cross-validation - 针对年度数据错误的 Prophet 交叉验证
问题描述
在对 Prophet 模型执行交叉验证时,我遇到了一个错误:不再支持单位“M”、“Y”和“y”,因为它们不代表明确的 timedelta 值持续时间。
代码:
model=Prophet()
model.fit(df)
forecast=model.make_future_dataframe(periods=14,freq='A)
future=model.predict(forecast)
from prophet.diagnostics import cross_validation
dataframe_crossvalidation=cross_validation(model,initial=pd.to_timedelta(42,unit="Y"),
period=pd.to_timedelta(7,unit="Y"),horizon=pd.to_timedelta(14,unit="Y"))
**error: Units 'M', 'Y', and 'y' are no longer supported, as they do not represent unambiguous
timedelta values durations**
有关如何解决此问题的任何建议?
解决方案
推荐阅读
- picocli - PicoCLI :我如何使用@ArgGroup 作为方法?
- mybatis - 尝试从 ibatis 版本 2 升级到 mybatis 3.3,卡在下面的代码片段中
- node.js - Firebase onCreate 方法未触发
- reactjs - 如何在反应表上打开表行?
- extjs - ExtJS 在 Safari 14 上冻结
- sql - 创建不重复同一列的 SQL 表
- vue.js - Vue:测试 utils vue 组合 - root.$route
- c - C - 我应该使用引号还是方括号将标题包含在单独的目录中
- docker - Docker 日志 - 将时间从主机同步到容器
- php - 有没有办法让 PHP 在表格中向下获取第二行的值?