pad
Pad(length, *, features=None)
Bases: Transform
Pad time-series features to the specified length.
Pad time-series features to the specified end-time by holding their last
value for one more sample.
This is useful for ensuring that all time-series features cover at least a
time interval of the specified length. Time-series that are already longer
than the specified will not be modified.
The resulting features will not be equidistant in time. To achieve
equidistant time-series, consider using the Resample
transform after
padding.
Initializes the Pad transform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
length
|
float
|
The length (time) to pad the features to. This is the minimum length that the features will have after applying this transform. |
required |
features
|
None | str | Iterable[str]
|
The features to apply this transform to. Defaults to
|
None
|
Source code in src/flowcean/polars/transforms/pad.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|