IntLevPy: A Python library to classify and model intermittent and Lévy processes Journal: SoftwareX
Shailendra Bhandari, Pedro Lencastre, Sergiy Denysov, Yurii Bystryk, Pedro G. Lind · 2025
Read IntLevPy: A Python library to classify and model intermittent and Lévy processes Journal: SoftwareX by Shailendra Bhandari, Pedro Lencastre, Sergiy Denysov, Yurii Bystryk, Pedro G. Lind (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-03729.txt.
Introduction
Shailendra Bhandari and four co-authors describe a 2025 software paper, published in SoftwareX, on a Python library called IntLevPy. The library tackles two families of random processes that show up in nature and finance. Intermittent processes burst and rest in turns, while Lévy processes make sudden jumps of many sizes.
IntLevPy can simulate both families, fit their parameters to real data, and compute their key moments. Its sorting method uses a corrected fit score together with a custom performance measure to tell the two families apart. Fitting loops pair trial parameters with simulation checks until the match holds up. The paper serves as a full user guide, covering the library's layout, setup, test workflows, and worked examples. For researchers facing bursty or jumpy data, the package joins theory and practice in one tool.
Catalog record
| CREATOR | Shailendra Bhandari, Pedro Lencastre, Sergiy Denysov, Yurii Bystryk, Pedro G. Lind |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 17 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-03729
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
IntLevPy: A Python library to classify and model intermittent and Lévy processes Journal: SoftwareX Shailendra Bhandari, Pedro Lencastre, Sergiy Denysov, Yurii Bystryk, Pedro G. Lind Abstract IntLevPy provides a comprehensive description of the IntLevPy Package, a Python library designed for simulating and analyzing intermittent and Lévy processes. The package includes functionalities for process simulation, including full parameter estimation and fitting optimization for both families of processes, moment calculation, and classification methods. The classification methodology utilizes adjusted- R 2 R^{2} and a noble performance measure Γ \Gamma , enabling the distinction between intermittent and Lévy processes. IntLevPy integrates iterative parameter optimization with simulation-based validation. This paper provides an in-depth user guide covering IntLevPy software architecture, installation, validation workflows, and usage examples. In this way, IntLevPy facilitates systematic exploration of these two broad classes of stochastic processes, bridging theoretical models and practical applications. Code metadata description Metadata Current code version v0.0.4 Permanent link to code/repository used for this code version https://github.com/shailendrabhandari/IntLevPy.git Permanent link to Python Library https://pypi.org/project/IntLevPy/ Legal Code License MIT License Code versioning system used PyPI and git Software code languages, tools, and services used Python Compilation requirements, operating environments & dependencies Requires Python 3.6 or later. Dependencies: numpy, scipy, matplotlib, pandas, seaborn, scikit-learn, pomegranate If available, link to developer documentation/manual https://intlevpy.readthedocs.io/en/latest/ Support email for questions [email protected] Table 1: Code metadata of the IntLevPy library. 1 Motivation and significance In theoretical ecology and various other fields, understanding and modeling the movement patterns of organisms and particles is essential for unraveling complex systems dynamics. Random walks are fundamental tools used to simulate these stochastic movements observed in nature [ 1 , 2 ] . These models are vital for understanding how animals explore and exploit their environments to find food. Among the various models of random walks, Intermittent search (IS) and Lévy walks (LW) strategies stand out [ 3 ] . IS processes [ 4 , 5 ] are characterized by alternating between two distinct movement phases: ballistic and diffusive. During the ballistic phase, the searcher moves rapidly in a straight line, enabling it to cover large distances efficiently. In contrast, the diffusive phase involves slow, random movements, allowing for thorough local exploration. The dynamics of these phases can be mathematically described as: \vec{R}(t+\Delta t)=\vec{R}(t)+\left\{\begin{array}[]{ll}\vec{V}_{\rm B}\Delta t,&\text{(Ballistic)},\\ \vec{V}_{\rm D}\sqrt{\Delta t},&\text{(Diffusive)},\end{array}\right. (1) where \vec{V}_{\rm B} is the constant velocity vector during the ballistic phase, and \vec{V}_{\rm D}=D\vec{\eta} represents the random velocity during the diffusive phase, with D being the diffusion coefficient and \vec{\eta} a random vector with components drawn from a normal distribution with zero mean and unit variance. The transitions between phases are governed by the switching rates \lambda_{BD} (from ballistic to diffusive) and \lambda_{DB} (from diffusive to ballistic). The intermittent search model is thus defined by four key parameters: {D,V_{B},\lambda_{BD},\lambda_{DB}} . LWs [ 6 , 7 , 8 ] are a class of random walks known for their step lengths following a heavy-tailed power-law distribution, which leads to super-diffusive behavior. "Super"-diffusivity means they are characterized by frequent short steps interspersed with rare long ones. These two features are embedded in a power law probability density function (PDF) for the step lengths l , namely p(l)=\frac{\nu l_{\text{min}}^{\nu}}{l^{\nu+1}}, (2) where \quad l\geq l_{\text{min}} , 1<\nu<2 is the Lévy exponent, and l_{\text{min}} is the minimum step length. The effectiveness of LW as an optimal search strategy was highlighted by Shlesinger and Klafter [ 9 ] , and further demonstrated by Viswanathan et al. [ 10 ] , who showed that an LW with \ nu=1 (Cauchy walk) optimizes search efficiency in sparse environments. Typically we modelled LWs as uniform planar processes [ 11 ] , where a particle moves at a constant velocity v in a randomly chosen direction \phi\in[0,2\pi) for a time \tau , after which a new direction and time duration are selected based on the PDF: \psi(\tau)=\frac{\gamma\tau_{0}^{\gamma}}{\left(\tau+\tau_{0}\right)^{1+\gamma}}, (3) with scale parameter \tau_{0}>0 . The parameters {\tau_{0},\gamma,v} fully define the process. Anomalous diffusion processes like IS and LW are ubiquitous in natural and artificial systems, including animal foraging patterns, microbial movement, human travel behavior, and even financial market dynamics [ 10 , 12 , 13 ] . Accurate simulation and analysis of these processes are crucial for predicting system behavior and understanding underlying mechanisms. Recently, we have derived analytical expressions for the second and fourth-order moments of IS processes, as well as an accurate approximation of the moments of the LW class of processes. Moreover, we showed how these two statistical moments can be fitted with an iterative optimization scheme to estimate all parameters defining the underlying process. Details are given in Ref. [ 14 ] . However, despite the importance of these processes, e.g. to model time-series of measurements or observations, there has been a lack of comprehensive, user-friendly computational libraries that enable researchers to simulate and analyze intermittent and Lévy processes effectively. Existing tools often require extensive expertise to implement and may not offer the flexibility needed for diverse research applications. To overcome this shortcoming, we present IntLevPy. The IntLevPy library is a Python library designed for simulating, analyzing, and classifying intermittent and Lévy processes. Its main functionalities include (details below) the simulation of each class of processes, their statistical analysis (computation of moments), classification to distinguish between IS and LWs, and respective estimation of parameters. With such features, the package contributes to scientific discovery by allowing researchers to explore new questions related to anomalous diffusion and search strategies in complex environments. For instance, it can be used to test hypotheses about optimal foraging strategies in ecology or to model the spread of information in social networks. 2 Software description The IntLevPy is a modular Python library that provides tools for simulating and analyzing intermittent and Lévy processes. The software is designed to be extensible and easy to integrate into existing workflows. Its code metadata descriptions are given in Table 1 . 2.1 Software architecture The package is organized into the following modules: 1. processes.py : Functions for simulating intermittent and Lévy processes. 2. moments.py : Functions for calculating theoretical and empirical statistical moments. 3. optimization.py : Functions for optimizing model parameters using empirical data. 4. classification.py : Functions for classifying processes using statistical methods. 5. utils.py : Utility functions for data analysis and processing. 6. examples/ : Directory containing example scripts demonstrating package usage. 7. tests/ : Directory containing unit tests for validating the code. 2.2 Software functionalities The major functionalities of the software include: 1. Process simulation : Generate realistic intermittent and Lévy trajectories with customizable parameters, allowing for extensive experimentation and modeling. 2. Statistical analysis : Calculate theoretical and empirical statistical moments (e.g., second and fourth moments). These statistical metrics are useful to understand the processes’ dynamics and properties [ 14 ] . 3. Process classification : Distinguish between intermittent and Lévy processes based on statistical properties, aiding in analyzing experimental data and identifying underlying movement strategies. 4. Parameter estimation and optimization : Fit model parameters to empirical data using advanced optimization techniques, enhancing model accuracy and reliability. Figure 1 illustrates the detailed workflow of simulating, classifying, and modeling intermittent and Lévy processes. Starting with parameter initialization and iterative random parameter generation, the workflow encompasses simulation, computation of the second and fourth moments, classification using statistical methods,