[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #10103] Add weighted standard deviation fe
From: |
anonymous |
Subject: |
[Octave-patch-tracker] [patch #10103] Add weighted standard deviation feature to 'std' |
Date: |
Thu, 2 Sep 2021 06:43:47 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 |
Follow-up Comment #6, patch #10103 (project octave):
I'll post a new patch shortly.
[comment #5 comment #5:]
> Are there any other corner cases that should be checked? (matlab accepts
inf and nan elements for W, is this output compatible?)
>
Yes, the answer is NaN when NaN or Inf values are there. I'll add a test case
to show that. MATLAB also has got an option to omit NaN values, which is easy
to add.
[comment #5 comment #5:]
> Also, i didn't step through it but looking at line 131, should that be "./"
? is den guaranteed to be a scalar?
>
Yes, because the weight vector is, well, a vector, hence the sum over its
elements is a scalar. I'll add a test case to show that matrices are not
allowed.
As a side note, I'd like to point out that there is more work to do anyway.
Weighted standard deviation depends on a weighted mean, which is not available
at the moment (I compute the weighted mean, without using the mean function).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10103>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/