How to import tsfel module without raise error?

237 Views Asked by At

I use the tsfel package to extract features from signals. I try to implement a personalized feature and I have read the documentation (https://tsfel.readthedocs.io/en/latest/descriptions/personal.html). I have followed the steps exactly but when i try to run the second step (i.e. Add the new feature to features.json) it raises an error ModuleNotFoundError: No module named 'tsfel.features_utils'.

Here is a simple example of code

import numpy as np
# from tsfel.add_personal_features import add_feature_json

@set_domain("domain", "statistical")
def range(signal):
    range = np.max(signal) - np.min(signal)
    return range

The error is: ModuleNotFoundError: No module named 'tsfel.features_utils'

How should I import the module?

1

There are 1 best solutions below

0
On

For the version 0.1.6, you may do as follows

from tsfel.feature_extraction.features_utils import set_domain

You can also confirm it from the github enter image description here