Shortcuts

Nan2Value

class torchtime.transforms.Nan2Value(value: Union[int, float] = 0, median: bool = False, by_channel: bool = False)[source]

Replace NaN values in a time series by some value or its median.

Parameters:
  • value (int, float) – The value NaNs should be replaced with.

  • median (bool) – If True, NaN values are replaced by the median of time series.

  • by_channel (bool) – If True, NaN values are replaced with the channel-wise median.