SpectralDecomposition

class probly.quantification.decomposition.spectral.SpectralDecomposition(embeddings: EmbeddingSampleSample[Embedding[T]], gamma: float = 1.0, normalized: bool = True, eps: float = 1e-12)[source]

Bases: AdditiveDecomposition, Generic

Spectral decomposition into total, aleatoric, and epistemic uncertainty [WGD+26].

The outer sample holds the groups, such as clarifications of a prompt, and each inner sample the responses within a group. The total uncertainty is the Von Neumann entropy of the kernel over all responses, the aleatoric uncertainty is the mean Von Neumann entropy within a group, and the epistemic uncertainty is their difference, the Holevo information.

property aleatoric: AU

The aleatoric uncertainty of the decomposition.

canonical_notion[source]

alias of TotalUncertainty

property components: list[type[Notion]]

The components of the decomposition.

embeddings: EmbeddingSampleSample[Embedding[T]]
property epistemic: EU

The epistemic uncertainty of the decomposition.

eps: float
gamma: float
get(k[, d]) → D[k] if k in D, else d.  d defaults to None.
get_canonical() → Notion[source]

Return the canonical notion of the decomposition.

get_notion(notion: type[N]) → N[source]

Return the component corresponding to the given notion.

items() → a set-like object providing a view on D's items
keys() → a set-like object providing a view on D's keys
normalized: bool
property total: TU

The total uncertainty of the decomposition.

values() → an object providing a view on D's values