Transformer
TSFELTransformer
TSFEL transformer to extract features by domain or specific feature names.
Quickstart
python
from sktime.transformations.tsfel import TSFELTransformer
estimator = TSFELTransformer(features=None, fs=None, window_size=None, overlap=0, verbose=1, kwargs=None)Parameters(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.
Examples
>>> 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 ]