Skip to main content

EntropyHub: An open-source toolkit for entropic time series analysis

Python Edition

     ___  _   _  _____  _____  ____  ____  _     _          
    |  _|| \ | ||_   _||     \|    ||    || \   / |   ___________ 
    | \_ |  \| |  | |  |   __/|    ||  __| \ \_/ /   /  _______  \
    |  _|| \ \ |  | |  |   \  |    || |     \   /   |  /  ___  \  |
    | \_ | |\  |  | |  | |\ \ |    || |      | |    | |  /   \  | | 
    |___||_| \_|  |_|  |_| \_||____||_|      |_|   _|_|__\___/  | | 
     _   _  _   _  ____                           / |__\______\/  | 
    | | | || | | ||    \     An open-source      |  /\______\__|_/ 
    | |_| || | | ||    |     toolkit for         | |  /   \  | | 
    |  _  || | | ||    \     entropic time-      | |  \___/  | |          
    | | | || |_| ||     \    series analysis     |  \_______/  |
    |_| |_|\_____/|_____/                         \___________/ 

About

Information and uncertainty can be regarded as two sides of the same coin: the more uncertainty there is, the more information we gain by removing that uncertainty. In the context of information and probability theory, Entropy quantifies that uncertainty.

The concept of entropy has its origins in classical physics under the second law of thermodynamics, a law considered to underpin our fundamental understanding of time in physics. Attempting to analyse the analog world around us requires that we measure time in discrete steps, but doing so compromises our ability to measure entropy accurately. Various measures have been derived to estimate entropy (uncertainty) from discrete time series, each seeking to best capture the uncertainty of the system under examination. This has resulted in many entropy statistics from approximate entropy and sample entropy, to multiscale sample entropy and refined-composite multiscale cross-sample entropy.

As the number of statisitcal entropy measures grows, it becomes more difficult to identify, contrast and compare the performance of each measure. To overcome this, we have developed EntropyHub - an open-source toolkit designed to integrate the many established entropy methods into one package. The goal of EntropyHub is to provide a comprehensive set of functions with a simple and consistent syntax that allows the user to augment parameters at the command line, enabling a range from basic to advanced entropy methods to be implemented with ease.

It is important to clarify that the entropy functions herein described estimate entropy in the context of probability theory and information theory as defined by Shannon, and not thermodynamic or other entropies from classical physics.

Installation

There are two ways to install EntropyHub for Python. Method 1 is strongly recommended.

Method 1:

  1. Using pip in your python IDE, type: pip install EntropyHub

Method 2:

  1. Download the folder above (EntropyHub.x.x.x.tar.gz) and unzip it.
  2. Open a command terminal (cmd on Windows, terminal on Mac) or use the Anaconda prompt if you use Anaconda as your python package distribution.
  3. In the command prompt/terminal, navigate to the directory where you saved and extracted the .tar.gz folder.
  4. Enter the following in the command line: python setup.py install

System Requirements & Dependencies

There are several package dependencies which will be installed alongside EntropyHub: Numpy, Scipy, Matplotlib, PyEMD

EntropyHub was designed using Python 3 and thus is not intended for use with Python 2. Python versions > 3.6 are required for using EntropyHub.

Documentation & Help

A key advantage of EntropyHub is the comprehensive documentation available to help users to make the most of the toolkit. One can simply access the docstrings of a function (like any Python function) by typing help FunctionName in the command line, which will print the docstrings.

All information on the EntropyHub package is detailed in the EntropyHub Guide, a .pdf document available here.

Functions

EntropyHub functions fall into 5 categories:

* Base                functions for estimating the entropy of a single univariate time series.
* Cross               functions for estimating the entropy between two univariate time series.
* Bidimensional       functions for estimating the entropy of a two-dimensional univariate matrix.
* Multiscale          functions for estimating the multiscale entropy of a single univariate time series using any of the Base entropy functions.
* Multiscale Cross    functions for estimating the multiscale entropy between two univariate time series using any of the Cross-entropy functions.

The following tables outline the functions available in the EntropyHub package.

When new entropies are published in the scientific literature, efforts will be made to incorporate them in future releases.

Base Entropies:

Entropy Type Function Name
Approximate Entropy ApEn
Sample Entropy SampEn
Fuzzy Entropy FuzzEn
Kolmogorov Entropy K2En
Permutation Entropy PermEn
Conditional Entropy CondEn
Distribution Entropy DistEn
Spectral Entropy SpecEn
Dispersion Entropy DispEn
Symbolic Dynamic Entropy SyDyEn
Increment Entropy IncrEn
Cosine Similarity Entropy CoSiEn
Phase Entropy PhasEn
Slope Entropy SlopEn
Bubble Entropy BubbEn
Gridded Distribution Entropy GridEn
Entropy of Entropy EnofEn
Attention Entropy AttnEn

Cross Entropies:

Entropy Type Function Name
Cross Sample Entropy XSampEn
Cross Approximate Entropy XApEn
Cross Fuzzy Entropy XFuzzEn
Cross Permutation Entropy XPermEn
Cross Conditional Entropy XCondEn
Cross Distribution Entropy XDistEn
Cross Spectral Entropy XSpecEn
Cross Kolmogorov Entropy XK2En

Bidimensional Entropies

Entropy Type Function Name
Bi-Dimensional Sample Entropy SampEn2D
Bi-Dimensional Fuzzy Entropy FuzzEn2D
Bi-Dimensional Distribution Entropy DistEn2D

Multiscale Entropy Functions

Entropy Type Function Name
Multiscale Entropy MSEn
Composite/Refined-Composite Multiscale Entropy cMSEn
Refined Multiscale Entropy rMSEn
Hierarchical Multiscale Entropy hMSEn

Multiscale Cross-Entropy Functions

Entropy Type Function Name
Multiscale Cross-Entropy XMSEn
Composite/Refined-Composite Multiscale Cross-Entropy cXMSEn
Refined Multiscale Cross-Entropy rXMSEn
Hierarchical Multiscale Cross-Entropy hXMSEn

License and Terms of Use

EntropyHub is licensed under the Apache License (Version 2.0) and is free to use by all on condition that the following reference be included on any outputs realized using the software:

    Matthew W. Flood and Bernd Grimm, 
    EntropyHub: An Open-Source Toolkit for Entropic Time Series Analysis,
    2021 github.com/MattWillFlood/EntropyHub

    © Copyright 2021 Matthew W. Flood, EntropyHub
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
             http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    
    For Terms of Use see https://www.EntropyHub.xyz

Contact

If you find this package useful, please consider starring it on GitHub, MatLab File Exchange, PyPI or Julia Packages as this helps us to gauge user satisfaction.

If you have any questions about the package or identify any issues, please do not hesitate to contact us at: info@entropyhub.xyz

Thank you for using EntropyHub.

Yours in research,

Matt

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EntropyHub-0.0.1.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

EntropyHub-0.0.1-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

File details

Details for the file EntropyHub-0.0.1.tar.gz.

File metadata

  • Download URL: EntropyHub-0.0.1.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for EntropyHub-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3af6d67ea20b61eee963b394ff31dfa20b82ced55eda65fbd04b54c6f21574a9
MD5 d45de6b05b6ae3419efd533f493071da
BLAKE2b-256 c4c6ad5ed0fbdf09dd152b2bed87feaa1f530354aacb1ca493b8177829025798

See more details on using hashes here.

File details

Details for the file EntropyHub-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: EntropyHub-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for EntropyHub-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da202cfcd117c9253732a26bcddb31d1ee4f9e265cce55bb36cfcfa71fdcbef1
MD5 7480505d3f873220cac9b6316b90742e
BLAKE2b-256 84c295958a2fb9bc24484035197d71bf081fd106a3532eaef75b47b1936b1a0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page