我有一个列表,其中每个列表代表一个时间序列:
tsli=[[43,65,23,765,233,455,7,32,57,78,4,32],[34,32,565,87,23,86,32,56,32,57,78,32],[87,43,12,46,32,46,13,23,6,90,67,8],[1,2,3,3,4,5,6,7,8,9,0,9],[12,34,56,76,34,12,45,67,34,21,12,22]]
我想使用tsfresh软件包从该数据集中提取功能,代码如下:
import tsfresh
tf=tsfresh.extract_features(tsli)
当我运行它时,我得到的值错误是:
> ValueError: You have to set the column_id which contains the ids of the different time series
But i don't know how to deal with this and how to define column id for this problem.
编辑1: 正如建议的那样,我尝试将数据集转换为数据,然后尝试:
import tsfresh
df=pd.DataFrame(tsli)
tf=tsfresh.extract_features(df)
但数值误差是相同的
> ValueError: You have to set the column_id which contains the ids of the different time series
任何资源或参考资料都会有所帮助
谢谢
首先,您必须将
list
转换为dataframe
,其中每个时间序列都有一个唯一的id,例如现在,您可以在创建的列上使用带有
column_id
参数的tsfresh:另一个例子:tsfresh Quick Start
相关问题 更多 >
编程相关推荐