incerto.bayesian.decompose_uncertainty

incerto.bayesian.decompose_uncertainty#

incerto.bayesian.decompose_uncertainty(predictions)[source]#

Decompose predictive uncertainty into epistemic and aleatoric components.

Total uncertainty = Epistemic + Aleatoric H[y|x] = I[y;θ|x] + E_θ[H[y|x,θ]]

Parameters:

predictions (Tensor) – Tensor of shape (num_samples, batch_size, num_classes)

Return type:

Tuple[Tensor, Tensor, Tensor]

Returns:

Tuple of (total_uncertainty, epistemic_uncertainty, aleatoric_uncertainty) Each has shape (batch_size,)