Fisher Information and Shannon Entropy

Calculate Fisher Information [∫(∂f(x)/∂x)^2*dx/f(x)] and Shannon Entropy [∫ - p(x) * log(p(x)) * dx].
45 Downloads
Updated 6 Nov 2023

View License

Calculate Fisher Information [∫(∂f(x)/∂x)^2*dx/f(x)] and Shannon Entropy [∫ - p(x) * log(p(x)) * dx].
Example:
shannonentropy(data)
fisherinformation(data)
Hints:
data has to be column vector (N by 1)
Modify 'MaxIntervalCount' or 'AbsoluteTolerance' (maybe 'RelativeTolerance' in quadgk) if it is too slow.
This is a product of CGRG-lab, contributed by Zheng-Kai Ye.

Cite As

Tsung-Hsi Wu (2026). Fisher Information and Shannon Entropy (https://www.mathworks.com/matlabcentral/fileexchange/154642-fisher-information-and-shannon-entropy), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0