mapie.metrics
.spiegelhalter_p_value¶
- mapie.metrics.spiegelhalter_p_value(y_true: numpy.ndarray[Any, numpy.dtype[numpy._typing._array_like._ScalarType_co]], y_score: numpy.ndarray[Any, numpy.dtype[numpy._typing._array_like._ScalarType_co]]) float [source]¶
Compute Spiegelhalter statistic p-value. Deduced from the corresponding statistic and CDF, which is no more than the normal distribution. It represents the probability of the observed statistic under the null hypothesis of perfect calibration.
- Parameters
- y_trueNDArray of shape (n_samples,)
An array of ground truth.
- y_scoreNDArray of shape (n_samples,)
An array of scores.
- Returns
- float
The Spiegelhalter statistic p_value.
References
Spiegelhalter DJ. Probabilistic prediction in patient management and clinical trials. Statistics in medicine. 1986 Sep;5(5):421-33.