Skip to main content

bursty_dynamics 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 visualise results.

Project description

PyPI Documentation DOI

bursty_dynamics 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 visualise results.

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 memory 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 trains of events.

  • Visualisation 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 bursty_dynamics via pip:

pip install bursty_dynamics

Usage

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

from bursty_dynamics.scores import calculate_scores
from bursty_dynamics.trains import train_detection, train_info, train_scores

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

# calculate BP and MC
score_df = 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.

Getting Help

For more information about bursty_dynamics, please check out:

License

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 for questions, suggestions, or general discussion related to our project, please visit our GitHub Discussions page.

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.1.6.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

bursty_dynamics-0.1.6-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bursty_dynamics-0.1.6.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for bursty_dynamics-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d95c21fb7b1c18957960f0cdb8ab15547dc652fa8130bd821a38ccd298d1bf3b
MD5 e9546b1bca9fdbeacdc0c6a3d99b20e8
BLAKE2b-256 7c29e56d335710c2feb28b38ef07282684eb811fa3984cab2d85d46100709211

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bursty_dynamics-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8d967554482470cd649524f37e62035a70d62f3f7f4a36b5a5c450182e8597b7
MD5 ab7fece1583d294542492ddc4449372a
BLAKE2b-256 8e90029b5eea87ae1c7d036d7f6054492d37a5506a9a41712e490c277e839586

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