我是新使用the的,当我使用下面的行时,我得到了所需的提取特性
import numpy as np
import pandas as pd
from tsfresh.feature_extraction import ComprehensiveFCParameters
from tsfresh import extract_features
df = pd.DataFrame(np.array([[1, 2, 3, 4],[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]),
columns=['Context ID','Time Elapsed', 'time_serie A', 'time_serie B'])
settings = ComprehensiveFCParameters()
kind_to_fc_parameters = {
"time_serie A": {},
"time_serie B": {"mean": None}
}
extract_features = extract_features(df, kind_to_fc_parameters =kind_to_fc_parameters,
column_id='Context ID', column_sort="Time Elapsed")
extract_features
然而,当我用{"absolute_maximum": None}
或"count_above": [{"t": 0.05}]
更改{"absolute_maximum": None}
或"count_above": [{"t": 0.05}]
时,它将不再起作用:
'tsfresh.feature_extraction.feature_calculators‘模块
没有属性“absolute_maximum”
我错过了什么?
发布于 2022-09-12 20:05:35
我所选择的另一种计算方法也有类似的问题,发现它不在feature_calculators.py
中(您可以从yourdirectory\Python\Python37\Lib\site-packages\tsfresh\feature_extraction
打开它),所以我在终端中做了pip install tsfresh -U
,以获得最新的there,再次检查feature_calculators.py
,我想要的函数在那里,然后代码运行良好。
https://stackoverflow.com/questions/69177258
复制相似问题