conditional_spectral_entropy¶
- probly.quantification.conditional_spectral_entropy = <flextype.singledispatch.Flexdispatch object>¶
Compute the mean spectral entropy within groups of embedding samples [WGD+26].
The outer sample holds the groups, such as clarifications of a prompt, and each inner sample the responses within a group. The Von Neumann entropy of each group’s kernel is averaged over the groups.
- Parameters:
embeddings – Sample of embedding samples.
gamma – RBF bandwidth parameter.
normalized – Whether embeddings are L2-normalized.
eps – Numerical cutoff for trace and eigenvalues.
- Returns:
Mean spectral entropy over the remaining batch shape.