pod.calculate_reliability_point

calculate_reliability_point(X_eval, ci_lower, target_pod=0.9)

Calculates the defect size (a90/95) where the Lower Confidence Bound crosses the target reliability threshold (usually 0.90).

Parameters

Name Type Description Default
X_eval np.ndarray The evaluation grid points. required
ci_lower np.ndarray The lower confidence bound curve (y values). required
target_pod float Target reliability level. Defaults to 0.90. 0.9

Returns

Name Type Description
float float The interpolated x-value where the bound first reaches the target, or
float np.nan if it never does. If the bound is already at or above the target at the
float first grid point, that point is returned (the true crossing is at or below it)
float and a warning is logged.

Examples

import numpy as np
X_eval = np.linspace(0, 10, 101)
lower_ci = 1 / (1 + np.exp(-(X_eval - 5)))
a90_95 = calculate_reliability_point(X_eval, lower_ci, target_pod=0.90)
print(f"a90/95 point: {a90_95:.2f}")