class sksurv.functions.StepFunction(x, y, a=1.0, b=0.0)[source]

Callable step function.

\[f(z) = a * y_i + b, x_i \leq z < x_{i + 1}\]
  • 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.
__init__(x, y, a=1.0, b=0.0)[source]

Initialize self. See help(type(self)) for accurate signature.


__init__(x, y[, a, b]) Initialize self.