【问题标题】:Using tsfresh on a simple pandas data frame在一个简单的 pandas 数据框上使用 tsfresh
【发布时间】:2017-04-09 07:29:53
【问题描述】:

我正在尝试在我制作的一个简单的 pandas 数据帧上提取特征 (tsfresh.extract_features)。每次我运行和打印特征时,我都会简单地将每个计算的特征作为 0 或 NaN。我已经尝试阅读大量文档,但似乎无法理解它。

代码如下:

d = {'one':pd.Series(np.random.randn(10)),
     'two':pd.Series(np.random.randn(10))}
df = pd.DataFrame(d)
print(df)
#
features = extract_features(df, column_id='one')
print(features)

感谢任何帮助。

谢谢

【问题讨论】:

  • tsfresh.extract_features(df, column_id='one') 适合我

标签: python pandas sklearn-pandas


【解决方案1】:

问题是您的时间序列只有一个值长,大多数特征计算器将为一个值的时间序列返回 NaN。

您可以尝试更长的时间序列。

看看这里的笔记本https://github.com/blue-yonder/tsfresh/tree/master/notebooks

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2019-07-26
    • 1970-01-01
    • 2022-11-12
    • 2022-12-15
    • 2019-11-14
    相关资源
    最近更新 更多