Skip to main content

burstydynamics is a Python package designed to facilitate the analysis of temporal patterns in longitudinal data. It provides functions to calculate the burstiness parameter (BP) and memory coefficient (MC), detect event trains, and visualize results.

Project description

Bursty dynamics

burstydynamics is a Python package designed to facilitate the analysis of temporal patterns in longitudinal data. It provides functions to calculate the burstiness parameter (BP) and memory coefficient (MC), detect event trains, and visualize results.

credit: This package implements the alternate burstiness parameter described in the paper ‘Measuring Burstiness for Finite Event Sequences’ by Kim, Eun-Kyeong, and Hang-Hyun Jo, and memeory coefficient described in ‘Burstiness and Memory in Complex Systems’ by Goh, K.-I., and A.-L. Barabási.

Features

  • Burstiness Parameter (BP) and Memory Coefficient (MC) Calculation: Calculate BP and MC to quantify the irregularity and memory effects of event timing within longitudinal data.
  • Event Train Detection: Detect and label event trains based on user-defined criteria such as maximum inter-event time and minimum burst size.
  • Train-Level Analysis: Analyse BP and MC for detected event trains, providing insights into temporal patterns within clusters of events.
  • Visualization Tools: Visualise temporal patterns with scatter plots, histograms, kernel density estimates (KDE), and more, facilitating interpretation of analysis results.
  • User-Friendly Interface: Designed for ease of use, with clear function parameters and output formats, making it accessible to both novice and experienced users.

Installation

You can install the burstydynamics via pip:

pip install burstydynamics

Usage

Here's a quick overview of how to use the main functionalities of the package:

from burstydynamics.scores import calculate_scores
from burstydynamics.trains import train_detection, calculate_train_info, calculate_scores_train

# Load your longitudinal data into a DataFrame
# df = load_data()

# Calculate burst parameters
burst_params = calculate_scores(df, subject_id = 'eid', time_col = 'event_dt')

For more example of usage, please take a look at examples.ipynb in the example folder.

License

bursty_dynamics is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on GitHub.

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

bursty_dynamics-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

bursty_dynamics-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file bursty_dynamics-0.0.2.tar.gz.

File metadata

  • Download URL: bursty_dynamics-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.7

File hashes

Hashes for bursty_dynamics-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9f525265fdb594f513e4bd83b43cd9cb31dc4e2a1035e26ebc46c1533a7e93a0
MD5 3e328b8a5f27277f988942f7d6aeae66
BLAKE2b-256 3894544b580602e28aa8819e4550f737b812e9a7636ec9f5c46c7739d3144a0a

See more details on using hashes here.

File details

Details for the file bursty_dynamics-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for bursty_dynamics-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87161e26e5e6a27a7ffecb7a86f5db373fdaa8d9eb35ec840d66c150a93ef27b
MD5 dceba0546b5bd841c1aa93d4316827b3
BLAKE2b-256 d753608b76d03c4d3c9ce967b9a07ee68a59b6c41b85e3e5d7862079b84673d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page