-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
Hi,
I'm using Distributions.jl in IncrementalInference.jl and found what looks to be inconsistent behavior when constructing MvNormals. One dimensional cases take deviation while higher dimensions almost always take covariance.
using Distributions
julia> Base.std(rand(Normal(0.0,100.0), 1000))
96.7377564234093
julia> Base.std(rand(MvNormal([0.0],[100.0]), 1000), 2)
1×1 Array{Float64,2}:
103.241
julia> Base.std(rand(MvNormal([0.0;0.0],[100.0;10.0]), 1000), 2)
2×1 Array{Float64,2}:
101.026
10.0854
julia> Base.std(rand(MvNormal([0.0;0.0],[[100.0;0.0]';[0.0;10.0]']), 1000), 2)
2×1 Array{Float64,2}:
10.1583
3.18971Notice the last call expects covariance where all others take standard deviation. Do we want to persist this behavior? I don't really mind(think it is worth fixing), but it's a bit confusing and cost me some time debugging.
Thanks for putting this package out there!
felixrehren, lassepe and FrancescaCrucinio
Metadata
Metadata
Assignees
Labels
No labels