-
Notifications
You must be signed in to change notification settings - Fork 188
Covariance of array elements #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Squashed commit of the following: commit c7d6c1d Author: Vandenplas, Jeremie <[email protected]> Date: Sun Apr 12 10:18:15 2020 +0200 covariance: addition of tests commit 9cd7e63 Author: Vandenplas, Jeremie <[email protected]> Date: Sun Apr 12 00:12:41 2020 +0200 covariance:comment commit 958b59b Author: Vandenplas, Jeremie <[email protected]> Date: Sat Apr 11 23:46:40 2020 +0200 covariance: correct test commit fdf4e54 Author: Vandenplas, Jeremie <[email protected]> Date: Sat Apr 11 22:57:23 2020 +0200 covariance: update spec commit c3c277f Author: Vandenplas, Jeremie <[email protected]> Date: Sat Apr 11 22:35:11 2020 +0200 covariance: support of cov for vectors commit c60ce03 Author: Vandenplas, Jeremie <[email protected]> Date: Sat Apr 11 21:46:41 2020 +0200 covariance: real + complex+integer commit 9e3eba0 Author: Vandenplas, Jeremie <[email protected]> Date: Fri Apr 10 23:16:48 2020 +0200 covariance: addition of complex commit 340309e Author: Vandenplas, Jeremie <[email protected]> Date: Fri Apr 10 22:32:17 2020 +0200 covariance: init
I am fine with both Overall a nice proposal, so I am fine with merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
I vote for cov
(is there chance of it being confused with something else? I don't think so).
Looks good. Yes |
It seems that all of you agreed with Note: An implementation to compute the covariance between 2 arrays still needs to be done, but it will be for another PR. |
I will merge this PR. Thank you for your reviews and approvals. |
Draft proposal for covariance of array elements opened for discussion
Related to #113
To be discussed:
cov
. But what aboutcovariance
,....?variance
An implementation to compute the covariance among 2 arrays still needs to be done.
Others:
Octave
cov
Matlab
cov
Julia
cov
R
cov
Numpy
cov
cov
- covariance of array elementsDescription
Returns the covariance of the elements of
array
along dimensiondim
if the corresponding element in
mask
istrue
.Per default, the covariance is defined as:
where n is the number of elements.
The scaling can be changed with the logical argument
corrected
. Ifcorrected
is.false.
,then the sum is scaled with
n
, otherwise withn-1
.Syntax
result = cov(array, dim [, mask [, corrected]])