Skip to main content

A package for selecting ensemble members using entropy theory

Project description

En-EMS | Entropy-based Ensemble Members Selection

en-ems is a Python library for the selection of a set of mutually exclusive, collectivelly exaustive (MECE) ensemble members.

The library implements the approach presented by Darbandsari and Coulibaly (2020) as step that antecedes the further merging of a set of ensemble forecasts.

The en-ems package is built over the pyitlib package, which implements fundamental information theory methods.

Installing

The library can be installed using the traditional pip:

pip install en-ems

And is listed on the Python Package Index (pypi) as en-ems.

Using

Suppose you have a file named example.csv with the following content:

Date,       Memb_A, Memb_B, ...,  Memb_Z, Obsv
2020/05/15, 1.12,   1.05,   ...,  0.5,    1.01
2020/05/16, 1.15,   1.12,   ...,  0.9,    1.10
2020/05/17, 1.13,   1.32,   ...,  1.1,    1.29
...         ...     ...     ...,  ...,    ...
2020/11/30, 1.22,   0.95,   ...,  0.3,    0.87

In which the columns starting with "Memb_" hold the realization of one ensemble member for the time interval and "Obsv" holds the observed values for the same time interval.

If your our objective is to select a MECE set considering obaservations, it can be done using the standard parameters by:

import pandas as pd
import enems

# read file
data_ensemble = pd.read_csv("example.csv").to_dict('list')
data_obsv = data_ensemble["Obsv"]
del data_ensemble["Obsv"], data_ensemble["Date"]

# perform selection
selected_members = enems.select_ensemble_members(data_ensemble, data_obsv)

The variable selected_members will be a dictionary with the following keys and values:

  • history: dictionary with the following additional information related with the selection process:
    • total_correlation: list of floats
    • joint_entropy: list of floats
    • transinformation: list of floats or None
  • selected_members: list of string with the labels of the selected elements
  • original_ensemble_joint_entropy: float

Further documentation

Further information can be found in the docs folder of this project.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

en_ems-0.1.2-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file en_ems-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: en_ems-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

File hashes

Hashes for en_ems-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5717f3cf1f4743395d1716ab1ea9e2e05c930064ba5ed63f5fc639266af202e
MD5 2ccec57b693a8250de00626aef24b9e5
BLAKE2b-256 0c2bbcdeb8cf3732a6ff4f4372e9dc46e8ea125f07bf7aa94bbc1c8a0f2671f3

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 Pingdom Monitoring Sentry Error logging StatusPage Status page