Skip to main content

ebemse | Entropy-Based Ensemble Members SElection

ebemse 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 (2021) as step that antecedes the further merging of a set of ensemble forecasts.

Installing

The library can be installed using the traditional pip:

pip install ebemse

And is listed on the Python Package Index (pypi) at .

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 ebemse

# 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 = ebemse.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 information

select_ensemble_members()

Arguments:

  • all_ensemble_members: dict
  • observations: Union[list, tuple, np.array, None] (default: None)
  • n_bins: Union[int, None] (default: 10)
  • bin_by: str (default: "quantile_individual")
  • beta_threshold: float (default: 0.9)
  • n_processes: int (default: 1)
  • minimum_n_members: int (default: 2)
  • verbose: bool (default: False)

Release files for ebemse 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ebemse 0.1
File Interpreter ABI Platform
ebemse-0.1-py3-none-any.whl Python 3 none any Details

Release files / ebemse-0.1-py3-none-any.whl

Download URL ebemse-0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61d53276e64507b63ccb76f6f14de2d25b539d6e9aeb762d843dda51d10f8307
BLAKE2b-256 checksum
How to use checksums
3e92cd744d849c389a64b19169440938f6d6280d4bc6dabe4f3dabc274019ede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page