sqEuclidean#
- mlquantify.utils.method.sqEuclidean(dist1, dist2)[source]#
Compute the squared Euclidean distance between two probability distributions.
The squared Euclidean distance is a measure of dissimilarity between two probability distributions. It is defined as:
D(P, Q) = Σ(Pᵢ - Qᵢ)²
- Parameters:
- dist1array-like
The first probability distribution ( P ), where each element ( Pᵢ ) represents the probability of the ( i )-th event.
- dist2array-like
The second probability distribution ( Q ), where each element ( Qᵢ ) represents the probability of the ( i )-th event.
- Returns:
- float
The squared Euclidean distance between the two distributions.
Notes
This distance is non-negative and equals zero if and only if the two distributions are identical.
Both input distributions must be valid probability distributions; their elements should be non-negative and sum to 1.