kl_divergence_score_func

probly.conformal_scores.kl_divergence_score_func = <flextype.singledispatch.Flexdispatch object>

Compute KL divergence with type-based target semantics.

Parameters:
  • y_pred – Predicted categorical probabilities or a categorical representation.

  • y_true – Integer class labels, floating-point probability vectors, or a categorical representation. Integer arrays always encode labels, including arrays containing only zeros and ones. Batch dimensions broadcast normally; shapes never select the target interpretation.

Returns:

Scores with the broadcast batch shape in the prediction backend.