sktime.transformations.panel.truncation

class sktime.transformations.panel.truncation.TruncationTransformer(lower=None, upper=None)[source]

Bases: sktime.transformations.base._PanelToPanelTransformer

TruncationTransformer docstring

Parameters
  • lower (int, optional (default=None) bottom range of the values to) –

    truncate can also be used to truncate to a specific length

    if None, will find the shortest sequence and use instead.

  • upper (int, optional (default=None) upper range, only required when) –

    paired with lower. This is used to calculate the range between. exclusive.

    if None, will truncate from 0 to the lower bound.

fit(X, y=None)[source]

Fit transformer.

Parameters
  • X (pandas DataFrame of shape [n_samples, n_features]) – Input data

  • y (pandas Series, shape (n_samples, ..), optional) – Targets for supervised learning.

Returns

self

Return type

an instance of self.

static get_min_length(X)[source]
transform(X, y=None)[source]

Transform X.

Parameters

X (nested pandas DataFrame of shape [n_instances, n_columns]) – Nested dataframe with time-series in cells.

Returns

Xt

Return type

pandas DataFrame