Back to models
Transformer

FittedParamExtractor

Fitted parameter extractor.

Extract parameters of a fitted forecaster as features for a subsequent tabular learning task. This class first fits a forecaster to the given time series and then returns the fitted parameters. The fitted parameters can be used as features for a tabular estimator (e.g. classification).

Quickstart

python
from sktime.transformations.summarize import FittedParamExtractor

estimator = FittedParamExtractor(forecaster, param_names, n_jobs=None)

Tags

Capabilities

  • Unequal-length series
  • Multivariate: Not supported
  • Inverse transform: Not supported
  • Missing values: Not supported
  • Removes missing values: Not supported
  • Equalizes series length: Not supported

Properties

Input typescitype:transform-input
Series
Output typescitype:transform-output
Primitives
Label typescitype:transform-labels
None
Fit is emptyfit_is_empty
Yes
Keeps the time indextransform-returns-same-time-index
No
Requires Xrequires_X
Yes
Requires yrequires_y
No
X and y need the same indexX-y-must-have-same-index
No

Parameters(3)

forecasterestimator object
sktime estimator to extract features from
param_namesstr
Name of parameters to extract from the forecaster.
n_jobsint, optional (default=None)
Number of jobs to run in parallel. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.

Examples

>>> import pandas as pd
>>> from sktime.forecasting.trend import TrendForecaster
>>> from sktime.transformations.summarize import FittedParamExtractor
>>> X = pd. DataFrame ({
... "series": [
... pd. Series ([1.0, 2.0, 3.0, 4.0 ]),
... pd. Series ([10.0, 8.0, 6.0, 4.0 ]),
... ]
... })
>>> t = FittedParamExtractor (
... forecaster = TrendForecaster (), param_names = "regressor__intercept"
... )
>>> t. fit_transform (X) regressor__intercept 0 1.0 1 10.0 Multiple fitted parameters can be extracted at once, one column each:
>>> t = FittedParamExtractor (
... forecaster = TrendForecaster (),
... param_names = ["regressor__intercept", "regressor__coef" ],
... )
>>> t. fit_transform (X) regressor__intercept regressor__coef 0 1.0 1.0 1 10.0 -2.0