pythonfeature-selectiontsfresh

Finite-valued target vector for select_features in tsfresh


I am using tsfresh in Python for a classification problem. The variable to predict can have 5 values (from 0 to 4). I am trying to use select_features to reduce the relevant features in the input. In the documentation I find that "Target vector...can be binary or real-valued" not for finite-valued. Is there a similar function to deal with finite (more than binary) target vectors? Or does it make sense to use select_features (so the target vector is considered as real-valued)?


Solution

  • You have probably already solved your problem. I will give an answer for other people stumbling upon this question. The function select_features(...) is correct, but only since the merge of this PR, which hasn't been released so far. So you would have to use the repo directly instead of pypi. An example doing it can be found in this tsfresh jupyter notebbok.

    Before you had to split you multiclass problem into binary problems. That is also described in the above mentioned notebook.