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
Bursty dynamics
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 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.
- 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 the 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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bursty_dynamics-0.0.8.tar.gz
.
File metadata
- Download URL: bursty_dynamics-0.0.8.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1a8cee684fae472e6a0245d0fb85e8885f024302a567072dc681feff24bec61 |
|
MD5 | 94f0e3a9fed4a9b73981b9420138d8ca |
|
BLAKE2b-256 | 9386073f2ac01c6c317aad5aab1352f09ed37b7ce6b607becb32ed2084dde7d0 |
File details
Details for the file bursty_dynamics-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: bursty_dynamics-0.0.8-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2b2f4ff586017b48b61b4a3450417cdc67d843082228b1b0aa629007abd6d5d |
|
MD5 | df0d46881860d9b86fdeeb145c92bb41 |
|
BLAKE2b-256 | 342fd8f500751035ac02c4248f345accc42b00714180339d48355ff9a6598739 |