Open AzamatB opened 5 years ago
An even better suggestion was made on the slack channel. The proposal is to deprecate varm(v, m)
, stdm(v, m)
and covm(v, m)
to var(v; μ = m)
, std(v; μ = m)
and cov(v; μ = m)
respectively.
Unicode should not be a required part of the API, so the keyword argument should be mean
instead of µ
, but otherwise I support that idea.
For now, let's not deprecate, just add the mean
keyword to var
, std
and cov
. Leave a comment about deprecating varm
, stdm
and covm
in Statistics 2.0.
It seems that there is already a mean keyword (for var
, std
at least. cov
would need a pair of means.)
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.1 (2018-09-29)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Statistics; var(1:10,mean=5.5)
9.166666666666666
cov
would need a vector of means.
Right, cov
has many variants and each requires a different mean argument:
julia> cov(randn(10)) # mean number
julia> cov(randn(10),randn(10)) # mean pair
julia> cov(randn(10,10)) # mean vector
We currently export
varm
andstdm
from Statistics stdlib. Since calculation ofcov
benefits from supplying mean as much as the calculation ofvar
andstd
, I believecovm
should be exported as well.