[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible re
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m |
Date: |
Tue, 6 Nov 2018 15:17:24 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 |
Follow-up Comment #1, bug #54974 (project octave):
Here is my first proposal how to fix this (see patch file V1):
* Use imhist instead of hist.
**This is what the Matlab help on entropy claims to do. I'm not sure this is
necessary.
* Normalize the resulting histogramm to have a sum of 1.
** This normalization is also mentioned on the Matlab help page. And when I
use this my results becomse compatible.
* Ignore the zero elements in the histogramm.
** This was also done before (as the code comment sais), but I do not
understand what entropy.m did before, the code was P += (P == 0);
* I added the example from comment #0 as new test case.
Please have a look and review this test. Any comments on the above mentioned
changes are appreciated.
I would espacially appreciate of someone could check of the new test case is
Matlab compatible (as I am currently only assuming this). And one or two more
Matlab compatible test cases with real numbers (e.g. 5 to 10 element matrices)
could also be useful.
(file #45372)
_______________________________________________________
Additional Item Attachment:
File name: entropy_compatibility_V1.patch Size:1 KB
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54974>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/06
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m,
Hartmut <=
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/06
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Avinoam Kalma, 2018/11/06
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/06
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Avinoam Kalma, 2018/11/06
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/08
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Avinoam Kalma, 2018/11/09
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/12
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Carnë Draug, 2018/11/13
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Avinoam Kalma, 2018/11/14
- [Octave-bug-tracker] [bug #54974] [octave forge] (image) incompatible results of entropy.m, Hartmut, 2018/11/14