You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, I want to use "number_crossing_m" to a column named "x1". So I have to set a parameter "m" to it. However, for the param "m", I want to let it be the mean of another column like "x2" or the "x1" itself. How should I do it ?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi @lk1983823 ,
with the default feature extraction function, it is not possible to do this. However, you could run the extraction on each of your time series (columns) separately: first, extract the mean, then adjust the settings, and finally call feature extraction only on one series. Then repeat for the next.
You can use the feature extraction settings to customize "m".
Here is an example how you can set "m"
fromtsfresh.feature_extractionimportComprehensiveFCParametersfromtsfresh.feature_extractionimportextract_features# Adjust the value for msettings=ComprehensiveFCParameters()
settings["number_crossing_m"] = [{'m': your_mean_value}]
results=extract_features(df, default_fc_parameters=settings)
Additionally, (but more complex), you could write your own custom feature calculator, which does (1) calculate the mean and (2) then call the original feature calculator. However, that only works for a single column (not when you want to use the mean for x2 for calculating x1). I would recommend the first option.
For example, I want to use "number_crossing_m" to a column named "x1". So I have to set a parameter "m" to it. However, for the param "m", I want to let it be the mean of another column like "x2" or the "x1" itself. How should I do it ?
Thanks.
The text was updated successfully, but these errors were encountered: