Entropy calculation incorrect?

Hello,

I have been using the matplotlib.mlab.entropy function and have noticed that it may be incorrect. I have posted a question on stackoverflow here:

http://stackoverflow.com/questions/23291576/matplotlib-mlab-entropy-calculation-incorrect

I thought I would should it on the mailing list too. Does anyone have any ideas?

Thanks,

Nathan

Nathan,

Thanks for bringing this up. It looks like the short-term fix is to make the documentation match the code. Longer term, it seems to me like this is the sort of thing that should be deprecated; it doesn't belong in matplotlib any more.

Would you open an issue on Github, please? Even better: submit a pull request that fixes the documentation.

Eric

···

On 2014/04/25 1:26 AM, Nathan Lindop wrote:

Hello,

I have been using the matplotlib.mlab.entropy function and have noticed
that it may be incorrect. I have posted a question on stackoverflow here:
python - Matplotlib mlab entropy calculation incorrect? - Stack Overflow

I thought I would should it on the mailing list too. Does anyone have
any ideas?

Thanks,
Nathan

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Eric,

Thanks. I have submitted a pull request to fix the documentation as you suggested.

Thanks for your help,

Nathan (aka captainwhippet)

···

From: Eric Firing <efiring@…202…>
To: matplotlib-users@lists.sourceforge.net
Sent: Friday, 25 April 2014, 19:38
Subject: Re: [Matplotlib-users] Entropy calculation incorrect?

Nathan,

Thanks for bringing this up. It looks like the short-term fix is to
make the documentation match the code. Longer term, it seems to me like
this is the sort of thing that should be deprecated; it doesn’t belong
in matplotlib any more.

Would you open an issue on Github, please? Even better: submit a
pull
request that fixes the documentation.

Eric

On 2014/04/25 1:26 AM, Nathan Lindop wrote:

Hello,

I have been using the matplotlib.mlab.entropy function and have noticed
that it may be incorrect. I have posted a question on stackoverflow here:
http://stackoverflow.com/questions/23291576/matplotlib-mlab-entropy-calculation-incorrect

I thought I would should it on the mailing list too. Does anyone have
any ideas?

Thanks,
Nathan


Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud
Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform


Matplotlib-users mailing list
Matplotlib-users@…431…ists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A
Collaboration Platform
http://p.sf.net/sfu/ExoPlatform


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

This is a side-remark.

Please, don't exaggerate with the term "incorrect". Binary, decimal, natural... logarithms, all this is just a matter of multiplicative CONSTANT, and sometimes a question of convention.
I am a physicist, and for "us" the entropy is NOT given in bits. We use natural logarithms, and in order to have the units appropriate for statistical physics / thermodynamics, we multiply the result by the Boltzmann constant, 1.38*10^(-23) Joule/Kelvin, and that's it.

Anyway, Eric Firing is right, all this has nothing to do with Matplotlib.

Best regards.
Jerzy Karczmarczuk

Jerzy,

Yes, understood.

The issue here is that the function is documented incorrectly and I have made a pull request to fix that.

Best regards,

Nathan.

···

From: Jerzy Karczmarczuk <jerzy.karczmarczuk@…3937…>
To: matplotlib-users@…712…orge.net
Sent: Monday, 28 April 2014, 10:02
Subject: Re: [Matplotlib-users] Entropy calculation incorrect?

This is a side-remark.

Please, don’t exaggerate with the term “incorrect”. Binary, decimal,
natural… logarithms, all this is just a matter of multiplicative
CONSTANT, and sometimes a question of convention.
I am a physicist, and for “us” the entropy is NOT given in bits. We use
natural logarithms, and in order to have the units appropriate for
statistical physics / thermodynamics, we multiply the result by the
Boltzmann constant, 1.38*10^(-23) Joule/Kelvin, and that’s it.

Anyway, Eric Firing is right, all this has nothing to do with Matplotlib.

Best regards.
Jerzy
Karczmarczuk


“Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.”
http://p.sf.net/sfu/SauceLabs


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users