Skip to main content

A Python package for generating Mittag-Leffler correlated noise

Project description

GenML: A Python Library to Generate the Mittag-Leffler Correlated Noise

Xiang Qu, Hui Zhao, Wenjie Cai, Gongyi Wang, and Zihan Huang

School of Physics and Electronics, Hunan University, Changsha 410082, China

E-mail: huangzih@hnu.edu.cn

GenML is a Python library designed for generating Mittag-Leffler correlated noise, which is crucial for modeling a wide range of phenomena in complex systems. This document provides a brief overview of how to install and use GenML to generate M-L noise and compute its autocorrelation functions.

This work is supported by the National Natural Science Foundation of China (Grant No. 12104147) and the Fundamental Research Funds for the Central Universities.

Documentation website: https://genml.readthedocs.io

Installation

To install GenML, simply run the following command in your Python environment:

pip install -U genml

Basic Usage

The core functionalities of GenML include generating sequences of Mittag-Leffler correlated noise and calculating their autocorrelation functions. Here's how you can get started:

Generating Mittag-Leffler Correlated Noise

To generate sequences of Mittag-Leffler correlated noise , use the mln function with the desired parameters:

import genml

# Parameters
N = 10  # Number of sequences
T = 500  # Length of each sequence
C = 1.0  # Amplitude coefficient
lamda = 0.5  # Mittag-Leffler exponent
tau = 10  # Characteristic memory time
seed = 42 # Random seed

# Generate M-L noise sequences
xi = genml.mln(N, T, C, lamda, tau, seed)

Calculating Autocorrelation Function

To calculate the autocorrelation function (ACF) values of the generated noise sequences, you can use the acf function for actual ACF values and the acft function for theoretical ACF values:

tmax = 100  # Max lag for ACF calculation
dt = 1  # Step size between lags
nc = 4  # Number of CPU cores for parallel processing

# Calculate actual ACF values
acfv = genml.acf(xi, tmax, dt, nc)

# Calculate theoretical ACF values
acftv = genml.acft(tmax, dt, C, lamda, tau)

Examples

The repository includes detailed examples illustrating the generation of Mittag-Leffler correlated noise and the calculation of its autocorrelation function. These examples demonstrate the library's capability to replicate theoretical noise properties.

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

genml-0.4.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

genml-0.4.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file genml-0.4.1.tar.gz.

File metadata

  • Download URL: genml-0.4.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for genml-0.4.1.tar.gz
Algorithm Hash digest
SHA256 dd3bc2f9c2e3e9519bd391d2169f2bb95a580346be0e672a18190913fe562ffe
MD5 cf702236cac2292d0673ece2fd7158dd
BLAKE2b-256 dc10572b808ed0ba1a2ff106d19676e8c5ecf3a12d55325284f7ae81b3ee887a

See more details on using hashes here.

File details

Details for the file genml-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: genml-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for genml-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9b5f95dfc4c861aa5aa2d57697198f610bfe7a5e0fd3aed9cfeb33db6b66e69
MD5 d70eac905c83bc65c712a8625f45f0fe
BLAKE2b-256 66d24f70bd77f6c8e43ec04d41e7560c47e6751fa68d577b628e65a6ae63870d

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