Potsdam Institute for Climate Impact Research (PIK)
Interdisciplinary Center for Dynamics of Complex Systems (University of Potsdam)
Cardiovascular Physics Group (Humboldt-Universität zu Berlin)
PIK Logo
TOCSY - Toolboxes for Complex Systems
PIK/ Antique/ Blue
Home Home
 ACE
 Adaptive Filtering
 Approx. RQA
 CoinCalc
 Commandline RPs
 COPRA
 Coupling Analysis
 CRP Toolbox
 DSProlog
 Coupling Direction
 IOTA
 K2
 Makeinstall
 NEST
 PECUZAL
 PETROPY
 pyUnicorn
 RECFLOW
 RECGRAM
 RECLAC
 RP
 rqaci
 RSA
 System Identification
 TIGRAMITE
 SOWAS

PETROPY - Permutation Entropy

(for MATLAB®)


General Notes

Permutation entropy provides a simple and robust method to estimate complexity of time series, taking the temporal order of the values into account. Furthermore, permutation entropy can be used to determine embedding parameters or identify couplings between time series. For further instructions please consider the reference given below.


Usage

H = petropy(x,n,tau,method,accu)

xtime series (N × 1 or 1 × N vector)
npermutation order
tautime lag/ time lag vector (length = n-1)
method method how to deal with equal values in the series
'noise' - add small noise to the values in x
'same' - allow same rank for equal values
'order' - consider order of appearance (first occurence --> lower rank)
accumaximum number of decimal places in x (only used for method 'noise')

H gives the value of the permutation entropy according to H = − ∑(pj log2 pj) (j = 1, …, n).


Example

Consider the time series

x = [6,9,11,12,8,13,5];
The permutation entropy of this time series with a permutation order of 3 and with lag 1 is
H = petropy(x,3,1,'order');
H = 
    1.5219

References

  • Riedl, M., Müller, A., Wessel, N.: Practical considerations of permutation entropy, Eur. Phys. J. ST, 222(2), 249-262, 2013.


Download

petropy.m


Author

Andreas Müller



© 2004-2026 SOME RIGHTS RESERVED
University of Potsdam, Interdisciplinary Center for Dynamics of Complex Systems, Germany
Potsdam Institute for Climate Impact Research, Complexity Science, Germany

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Germany License.
Imprint, Data policy, Disclaimer, Accessibility statement

Please respect the copyrights! The content is protected by the Creative Commons License. If you use the provided programmes, text or figures, you have to refer to the given publications and this web site (tocsy.pik-potsdam.de) as well.

@MEMBER OF PROJECT HONEY POT
Spam Harvester Protection Network
provided by Unspam