Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

Implement std(::MultivariateDistribution)

Open bicycle1885 opened this issue 3 years ago • 6 comments

This implements std for multivariate distributions as an element-wise square root of variance: std(d) = sqrt.(var(d)).

bicycle1885 avatar Jun 24 '21 07:06 bicycle1885

Codecov Report

Merging #1352 (4b25a95) into master (a0cb096) will increase coverage by 0.84%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1352      +/-   ##
==========================================
+ Coverage   82.23%   83.07%   +0.84%     
==========================================
  Files         116      117       +1     
  Lines        6635     6766     +131     
==========================================
+ Hits         5456     5621     +165     
+ Misses       1179     1145      -34     
Impacted Files Coverage Δ
src/multivariate/dirichlet.jl 65.97% <100.00%> (+1.08%) :arrow_up:
src/multivariates.jl 72.15% <100.00%> (+1.48%) :arrow_up:
src/univariate/discrete/poisson.jl 74.07% <0.00%> (-3.35%) :arrow_down:
src/multivariate/mvtdist.jl 60.41% <0.00%> (-1.59%) :arrow_down:
src/univariate/discrete/categorical.jl 75.00% <0.00%> (-1.55%) :arrow_down:
src/univariate/continuous/generalizedpareto.jl 78.20% <0.00%> (-1.55%) :arrow_down:
src/univariate/discrete/bernoulli.jl 89.23% <0.00%> (-1.54%) :arrow_down:
...rc/univariate/discrete/noncentralhypergeometric.jl 91.15% <0.00%> (-1.21%) :arrow_down:
src/univariate/continuous/chi.jl 94.59% <0.00%> (-0.76%) :arrow_down:
src/univariate/discrete/binomial.jl 92.94% <0.00%> (-0.47%) :arrow_down:
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a0cb096...4b25a95. Read the comment docs.

codecov-commenter avatar Jun 24 '21 07:06 codecov-commenter

@bicycle1885 are you still interested in finishing this PR? @devmotion made a reasonable code suggestion that you would just need to accept, the other thing that seems missing is "add std to the documentation of multivariate distributions" - @devmotion could you clarify what you mean by that ?

st-- avatar Oct 09 '21 18:10 st--

@bicycle1885 are you still interested in finishing this PR? @devmotion made a reasonable code suggestion that you would just need to accept, the other thing that seems missing is "add std to the documentation of multivariate distributions" - @devmotion could you clarify what you mean by that ?

I addressed both. I also added a fix for Dirichlet, let's see if tests pass.

devmotion avatar Oct 09 '21 20:10 devmotion

@devmotion tests are passing, should it get merged now ?

st-- avatar Oct 27 '21 16:10 st--

I don't want to approve and merge my own changes. This does not feel right.

devmotion avatar Oct 27 '21 19:10 devmotion

@devmotion @st-- in open source ppl write PRs then forget about them, moving on to other things ALL THE TIME! If we wait for people, we'll never get anything done

azev77 avatar Oct 28 '21 21:10 azev77