Skip to main content

Recursive Mode Detection for ordinal data

Project description

ReMoDe: a Python library for efficient mode detection in ordinal data distributions.

ReMoDe (Recursive Mode Detection) is a Python library designed for the robust detection of modes in ordinal data distributions. It uses statistical tests, including Fisher's exact test and binomial tests, to determine if a given maximum in a data distribution is a true local maximum.

Features

  • Mode Detection: Identifies all potential local maxima in the dataset.
  • Statistical Tests: Implements Fisher's exact test and binomial tests to validate modes.
  • Data Formatting: Converts raw data into histogram format for analysis.
  • Stability Analysis: Includes functionality to assess the stability of detected modes using jackknife resampling.
  • Visualization: Provides methods to plot the histogram of data along with identified modes.

Installation

pip install remode

Usage

Here is a simple example of how to use the ReMode library:

from remode import ReMoDe

# Sample data (histogram counts)
xt_count = [8, 20, 5, 2, 6, 2, 30]

# Create an instance of ReMoDe
detector = ReMoDe()

# Fit model
results = detector.fit(xt_count)

# Plot the results
detector.plot_maxima()

# Perform stability analysis
stability_info = detector.evaluate_stability(percentage_steps=50)

See also the tutorial here.

Citation

Please cite the following paper:

TBA

and the following software

Garcia-Bernardo, J., Hoffstadt, M., & van der Maas, H. L. J. (2025). ReMoDe: a Python library for efficient mode detection in ordinal data distributions. Zenodo. https://doi.org/10.5281/zenodo.15366121

Contributing

Contributions are what make the open source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please refer to the CONTRIBUTING file for more information on issues and pull requests.

License

This project is licensed under the GNU GPLv3. This allows you to do almost anything they want with this project, except distributing closed source versions.

Contact

This project is a port of the R version of ReMoDe. It is maintained by the ODISSEI Social Data Science (SoDa) team.

SoDa logo

Do you have questions, suggestions, or remarks? File an issue in the issue tracker!

Project details


Download files

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

Source Distribution

remode-0.1.1.tar.gz (124.5 kB view details)

Uploaded Source

Built Distribution

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

remode-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file remode-0.1.1.tar.gz.

File metadata

  • Download URL: remode-0.1.1.tar.gz
  • Upload date:
  • Size: 124.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for remode-0.1.1.tar.gz
Algorithm Hash digest
SHA256 77bcff6f54563097f3ab41d7cbc285954cbcef0feac45142566753c62875df16
MD5 8ca69806da9fef9890d764b44141fdad
BLAKE2b-256 9ad80947a3ead4ea49bd8ab1eec26dc2541e2bd24598bf4ca056cd65b3d82094

See more details on using hashes here.

File details

Details for the file remode-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: remode-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for remode-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a6a111a4429ef0eab56df35c7c07db709a95c5579d636bc05361225ae9a9670
MD5 fbc4cb828eed7711756eb2854d30f621
BLAKE2b-256 e55c29b2d458bee02353e29311e562f7d9722b2abefe60ce1543f5fdacb909c1

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