Entropy (wavelet packet)
E = wentropy(X,
T
,P)
E = wentropy(X,T
)
E = wentropy(X,T
,0)
E = wentropy(X,
returns
the entropy T
,P)E
of the vector or matrix input X
.
In both cases, output E
is a real number.
E = wentropy(X,
is
equivalent to T
)E = wentropy(X,
.T
,0)
T
is a character vector containing
the type of entropy and P
is an optional parameter
depending on the value of T
.
Entropy Type Name (  Parameter (P)  Comments 

'shannon' 
 
'log energy' 
 
'threshold'  0 ≤ P 

'sure'  0 ≤ P 

'norm'  1 ≤ P 

'user'  Character vector 

FunName  No constraints on P 

Note
The 
Functionals verifying an additivetype property are well suited for efficient searching of binarytree structures and the fundamental splitting property of the wavelet packets decomposition. Classical entropybased criteria match these conditions and describe informationrelated properties for an accurate representation of a given signal. Entropy is a common concept in many fields, mainly in signal processing. The following example lists different entropy criteria. Many others are available and can be easily integrated. In the following expressions, s is the signal and (s_{i})_{i} the coefficients of s in an orthonormal basis.
The entropy E
must be an additive cost function
such that E(0) = 0 and
The (nonnormalized) Shannon entropy.
so,
,
with the convention 0log(0) = 0.
The concentration in l^{p} norm entropy with 1 ≤ p.
E2(s_{i} ) = s_{i}^{p} so
The "log energy" entropy.
so,
,
with the convention log(0) = 0.
The threshold entropy.
E4(s_{i}) = 1 if s_{i} > p and 0 elsewhere so E4(s) = #{i such that s_{i}  > p} is the number of time instants when the signal is greater than a threshold p.
The "SURE" entropy.
E5(s) = n  #{i such that
For more information, see the section Wavelet Packets for Compression and Denoising of the User's Guide.
% The current extension mode is zeropadding (see dwtmode). % Generate initial signal. x = randn(1,200); % Compute Shannon entropy of x. e = wentropy(x,'shannon') e = 142.7607 % Compute log energy entropy of x. e = wentropy(x,'log energy') e = 281.8975 % Compute threshold entropy of x % with threshold equal to 0.2. e = wentropy(x,'threshold',0.2) e = 162 % Compute Sure entropy of x % with threshold equal to 3. e = wentropy(x,'sure',3) e = 0.6575 % Compute norm entropy of x with power equal to 1.1. e = wentropy(x,'norm',1.1) e = 160.1583 % Compute user entropy of x with a user defined % function: userent for example. % This function must be a code file, with first line % of the following form: % % function e = userent(x) % % where x is a vector and e is a real number. % Then a new entropy is defined and can be used typing: % % e = wentropy(x,'user','userent') % % or more directly % % e = wentropy(x,'userent')
Coifman, R.R.; M.V. Wickerhauser (1992), "Entropybased Algorithms for best basis selection," IEEE Trans. on Inf. Theory, vol. 38, 2, pp. 713–718.
Donoho, D.L.; I.M. Johnstone, "Ideal denoising in an orthonormal basis chosen from a library of bases," C.R.A.S. Paris, Ser. I, t. 319, pp. 1317–1322.