[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54567] median(uint8) gives bad results
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #54567] median(uint8) gives bad results |
Date: |
Mon, 27 Aug 2018 19:44:43 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #16, bug #54567 (project octave):
I implemented many of the ideas in the various comments in to a patch which is
attached. The case for int64 is not ideal since it warns when there is
potential loss of accuracy, but should just calculate an accurate result. The
code is tricky enough that maybe Dan's suggestion of using mean() would be
better. First, fix mean() to handle every single case and then let median
call mean.
One possibility is to use the algorithm that Dan suggested in comment #11.
One could use permute ahead of the algorithm in order to guarantee that the
correct dimension was lined up the way the algorithm expects. After
calculating the median one would then use ipermute to reverse the change.
(file #44882)
_______________________________________________________
Additional Item Attachment:
File name: 54567.cset Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54567>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, (continued)
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Michael Godfrey, 2018/08/25
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/25
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Rik, 2018/08/25
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Michael Godfrey, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Dan Sebald, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results, Michael Godfrey, 2018/08/26
- [Octave-bug-tracker] [bug #54567] median(uint8) gives bad results,
Rik <=