cdf
- BMCI.cdf(y_obs, x2_max=-1)[source]
A posteriori cumulative distribution function (CDF).
This function approximates the cumulative posterior distribution \(F(x | \mathbf{y})\) for the given observation y_obs using
\[F(x | \mathbf{y}) = \int_{-\infty}^{x} p(x' | \mathbf{y}) \: dx' \approx \sum_{x_i < x} \frac{w_i(\mathbf{y})}{\sum_j w_j(\mathbf{y})}\]- Parameters:
y_obs (numpy.array) – m-element array containing the observation for which to compute the posterior CDF.
x2_max (float) – The \(\chi^2\) cutoff to apply to elements in the database. Ignored if less than zero.
- Returns:
A tuple (xs, ys) containing the estimated values of the posterior CDF \(F(x | \mathbf{y})\) evaluated at the $x$ values corresponding to the hits in the database.
- Raises:
ValueError – If the number of channels in the observations is different from the database.