TSFELTransformer
TSFEL transformer to extract features by domain or specific feature names.
This transformer uses features parameter to extract features in following ways:
By domain: Pass a domain (‘statistical’, ‘temporal’, ‘spectral’, ‘fractal’)
By feature names: Pass feature function names (e.g., ‘abs_energy’, ‘auc’)
Mixed: Pass a list containing both domain strings and feature names
For domain-based extraction, uses TSFEL’s time_series_features_extractor. For individual features, calls the feature functions directly from tsfel.feature_extraction.features.
See tsfel documentation for available options for features and parameters. https://tsfel.readthedocs.io/en/latest/descriptions/feature_list.html
Schnellstart
from sktime.transformations.tsfel import TSFELTransformer
estimator = TSFELTransformer(features=None, fs=None, window_size=None, overlap=0, verbose=1, kwargs=None)Parameter(6)
- - featuresstr, list of str, or None, optional (default=None)
Features to extract. Can be:
A domain string: ‘statistical’, ‘temporal’, ‘spectral’, ‘fractal’
A list of feature function names: [‘abs_energy’, ‘auc’, ‘autocorr’]
A list mixing domains and features: [‘statistical’, ‘abs_energy’]
None: extract all features from all domains
- - fsfloat, sampling frequency
- - window_sizeint, size of windows for feature extraction
- - overlapfloat, overlap between windows (0-1)
- - verboseint, verbosity level (0 or 1)
- kwargsdict, optional (default=None)
- Dictionary of additional keyword arguments that will be forwarded to TSFEL’s underlying feature extraction functions. Use this parameter to specify feature-specific options (e.g., “percentile” for “ecdf_percentile_count”). Refer to TSFEL’s documentation for allowed options for each feature and domain. If not provided, defaults from TSFEL functions will apply.
Beispiele
>>> from sktime.transformations.tsfel import TSFELTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> # Extract all statistical domain features
>>> transformer = TSFELTransformer (
... features = "statistical", verbose = 0
... )
>>> features = transformer. fit_transform (y)
>>> # Access TSFEL output for feature
>>> transformer ['statistical' ]. iloc [0 ]
>>> # Extract feature with custom parameters
>>> transformer = TSFELTransformer (
... features = ["ecdf_percentile_count" ],
... verbose = 0,
... kwargs = { "percentile": [0.6, 0.9, 1.0 ]}
... )
>>> features = transformer. fit_transform (y)
>>> transformer ['ecdf_percentile_count' ]. iloc [0 ]