TSFRESH: Get N most relevant features

只愿长相守 提交于 2021-01-29 05:50:35

问题


Is there any way to get the N most relevant features in TSFRESH? Currently, the method extract_relevant_features has a parameter fdr_level, but for a big amount of time series (>1000), the function with a very low fdr_level parameter (< 0.01) returns more than 400 features. I would like to return the 20 or 40 most relevant features.


回答1:


You could use the function calculate_relevance_table (link to the docu) (which is called internally in the select_features method, which in turn is called in the extract_relevant_features method) to get the p-value for each of the features and then only use the TOP-N sorted by p-value. So the general flow would be:

  • extract all features with extract_features
  • call calculate_relevance_table
  • sort by p-value
  • get only the top N

You could even tell tsfresh the next time to only extract those features (to save a lot of computation time) following this.



来源:https://stackoverflow.com/questions/62991201/tsfresh-get-n-most-relevant-features

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!