Open
Description
In this package the SqMahalanobis distance is implemented and documented as
I can verify this against the implementation in the Distributions
package or a hand-coded version.
using Distributions, Distances
q = rand(3,3)
Q = q'q
x = rand(3)
y = rand(3)
d0 = (x-y)'*inv(Q)*(x-y) # hand-coded
d1 = sqmahal(MvNormal(x, Q), y) # Distributions.jl
d2 = sqmahalanobis(x, y, Q)
d3 = sqmahalanobis(x, y, inv(Q))
d0 ≈ d2 # false
d0 ≈ d1 ≈ d3 # true
Am I misunderstanding the intended use or documentation of this function?
Metadata
Metadata
Assignees
Labels
No labels