https://github.com/chrisrac/pyenfra
A Python package for fractal and complexity analysis of time series.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
A Python package for fractal and complexity analysis of time series.
Basic Info
- Host: GitHub
- Owner: chrisrac
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://github.com/chrisrac/pyenfra
- Size: 70.3 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
pyenfra
Python Package for Environmental Fractal Analysis and Chaos Estimation
Official repository: github: pyenfra
Description
pyenfra is a Python library for fractal analysis, modeling and chaos estimation in time-series with the emphasis on environmental datasets. Package contains a suite of fractal and chaos metrics: - Hurst exponent for rescaled range, - Detrended Fluctuation Analysis (DFA), - Multifractality by Generalized Hurst Slope, - Wavelet Transform Modulus Maxima (with varying bands and modulus methods), - Sample Entropy, - Recurrence Quantification Analysis (RQA), - Lyapunov exponents.
Installation
pyenfra can be installed using pip or locally by downloading package copy.
pip install:
python
pip install pyenfra
local:
use repositiory to obtain package copy.
Usage
Below are a couple examples of package usage.
Please refer to examples.py for extended, detailed examples and computation workflows.
```python import numpy as np import matplotlib.pyplot as plt
import pyenfra
Generate White noise sample data
ts_white = np.random.RandomState(0).randn(2000)
Example: Compute Hurst exponent
hvalue = pyenfra.functions.hurst(tswhite, num=30, minn=10, minsegments=10)
Example: Interpret Hurst
print(pyenfra.interpreters.interprethurst(tswhite, useconfidenceinterval=False))
Example: Plot Hurst climacogram for AR(1)
axhurst = pyenfra.plotting.plothurst(tswhite, num=30, minn=10, minsegments=10, figsize=(5,4), scatterkwargs={'color':'C0'}, linekwargs={'color':'C1'}) axhurst.figure.suptitle("Climacogram: AR(1) Persistent Process") plt.show()
Example: Compute Lyapunov Exponent
lyapval, divergence, times = pyenfra.functions.lyapunov(tswhite, dim=3, tau=1, fs=1.0, maxiter=200, theiler=1) print(f"Estimated Lyapunov exponent (logistic r=3.99): {lyapval:.4f}") print("Interpretation:", pyenfra.interpreters.interpretlyapunov(lyapval)) ```
Roadmap
Future works on the package include: - [ ] HOST model integration. - [ ] On demand functions.
Contributing
Pull requests are welcome.
For major changes, please open an issue first to discuss implementation or changes.
Acknowledgment
This work was supported by NOAA grant NA19NOS4730207. Funding agency had no impact on work structure or findings.
License
This package is available under MIT license.
Owner
- Name: Krzysztof Raczynski
- Login: chrisrac
- Kind: user
- Location: Starkville, USA
- Company: Mississippi State University
- Repositories: 2
- Profile: https://github.com/chrisrac
GitHub Events
Total
- Push event: 4
Last Year
- Push event: 4
Packages
- Total packages: 1
-
Total downloads:
- pypi 15 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: pyenfra
A Python package for fractal and complexity analysis of time series.
- Homepage: https://github.com/chrisrac/pyenfra
- Documentation: https://pyenfra.readthedocs.io/
- License: MIT
-
Latest release: 0.4.0
published 8 months ago