timestamp - KeyError: Timestamp('2019-12-23 23:59:58.142906')
问题描述
In Facebook/Kats, I get the error below when I run the tutorial kats_202_detection.ipynb https://github.com/facebookresearch/Kats/blob/master/tutorials/kats_202_detection.ipynb
KeyError: Timestamp('2019-12-23 23:59:58.142906')
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
<ipython-input-265-b73347c84449> in <module>
3 d = MultivariateAnomalyDetector(multi_anomaly_ts, params, training_days=60)
4 display(params)
----> 5 anomaly_score_df = d.detector()
6
7 d.plot()
~\AppData\Local\Continuum\anaconda3\lib\site-packages\kats\detectors\outlier.py in detector(self)
300 while fcstTime < self.df.index.max():
301 # forecast for fcstTime+ 1
--> 302 pred_df = self._generate_forecast(fcstTime)
303 # calculate anomaly scores
304 anomaly_scores_t = self._calc_anomaly_scores(pred_df)
解决方案
推荐阅读
- php - PHP 致命错误:不能在第 180 行 CENSORED 的数组中使用空数组元素
- ios - 在 iOS 中读取系统相机设置
- r - ggplot2中的柱形图使用分类变量作为填充
- r - 创建一个逻辑变量来标识组中两个日期时间之间的最小差异的行
- jquery - jquery 循环遍历元素以动态添加 ids .?
- javascript - 如何使用滚动事件无限更改幻灯片。它是否与设置间隔功能一起使用,但如何滚动功能?
- javascript - React/JS 过滤器的问题
- r - 预测“tslm”接收未使用的参数错误
- mysql - 如何解决这个 pom.xml 问题?(与数据库的连接)
- r - R将字符串中的元素更改为不同类型的最新元素