cdf

QRNN.cdf(x)[source]

Approximate the posterior CDF for given inputs x.

Propagates the inputs in x forward through the network and approximates the posterior CDF by a piecewise linear function.

The piecewise linear function is given by its values at approximate quantiles xτ for τ={0.0,τ1,,τk,1.0} where τk are the quantiles to be estimated by the network. The values for x0.0 and x1.0 are computed using

x0.0=2.0xτ1xτ2x1.0=2.0xτkxτk1
Parameters:

x (np.array) – Array of shape (n, m) containing n inputs for which to predict the conditional quantiles.

Returns:

Tuple (xs, fs) containing the x-values in xs and corresponding values of the posterior CDF F(x) in fs.