synthcity.plugins.core.models.time_series_survival.utils module

class StepFunction(x: numpy.ndarray, y: numpy.ndarray, a: float = 1.0, b: float = 0.0)

Bases: object

Callable step function.

\[f(z) = a * y_i + b, x_i \leq z < x_{i + 1}\]
Parameters
  • x (ndarray, shape = (n_points,)) – Values on the x axis in ascending order.

  • y (ndarray, shape = (n_points,)) – Corresponding values on the y axis.

  • a (float, optional, default: 1.0) – Constant to multiply by.

  • b (float, optional, default: 0.0) – Constant offset term.

get_padded_features(x: numpy.ndarray, pad_size: Optional[int] = None, fill: int = nan) numpy.ndarray

Helper function to pad variable length RNN inputs with nans.