PaddleTS加载自定义数据集,调用plot_anoms显示异常检测时间序列时报错:The truth value of an array with more than one element is ambiguous

PaddleTS加载自定义数据集,调用plot_anoms显示异常检测时间序列时报错:The truth value of an array with more than one element is ambiguous

null
图片[1]-PaddleTS加载自定义数据集,调用plot_anoms显示异常检测时间序列时报错:The truth value of an array with more than one element is ambiguous-yiteyi-C++库

Traceback (most recent call last):

  File “main.py”, line 63, in <module>

    abnormal_test()

  File “main.py”, line 24, in abnormal_test

    plot_anoms(origin_data=custom_dataset, feature_name=’value’)

  File “D:\miniconda3\envs\py38\lib\site-packages\paddlets\utils\utils.py”, line 366, in plot_anoms

    plot_anoms_window(ax,origin_data)

  File “D:\miniconda3\envs\py38\lib\site-packages\paddlets\utils\utils.py”, line 344, in plot_anoms_window

    if y[splits[k]]:  # If splits[k] is anomalous

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

报错原因:

df = pd.read_csv(“training.csv”, index_col=”time”)

改为

df = pd.read_csv(“training.csv”)

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容