sktime.transformations.panel.interpolate¶
-
class
sktime.transformations.panel.interpolate.
TSInterpolator
(length)[source]¶ Bases:
sktime.transformations.base._PanelToPanelTransformer
Transformer that rescales series for another number of points. For each cell in dataframe transformer fits scipy linear interp1d and samples user defined number of points. Points are generated by numpy.linspace. After transformation each cell will be a numpy.array of defined size.
-
transform
(X, y=None)[source]¶ Takes series in each cell, train linear interpolation and samples n.
- Parameters
X (nested pandas DataFrame of shape [n_samples, n_features]) – Nested dataframe with time-series in cells.
- Returns
pandas DataFrame – of rows and columns
- Return type
Transformed pandas DataFrame with same number
-