# nolds: Nonlinear Measures for Dynamical Systems in Python

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/cschoel-nolds
Generated for open source discovery and AI-assisted research.

nolds is a Python library for calculating nonlinear measures in dynamical systems, specifically designed for one-dimensional time series. It provides implementations for various metrics such as sample entropy, correlation dimension, Lyapunov exponents, and Hurst exponent. This tool is valuable for analyzing the complexity, predictability, and memory of time series data, serving as both a practical utility and a learning resource.

GitHub: https://github.com/CSchoel/nolds
OSRepos URL: https://osrepos.com/repo/cschoel-nolds

## Summary

nolds is a Python library for calculating nonlinear measures in dynamical systems, specifically designed for one-dimensional time series. It provides implementations for various metrics such as sample entropy, correlation dimension, Lyapunov exponents, and Hurst exponent. This tool is valuable for analyzing the complexity, predictability, and memory of time series data, serving as both a practical utility and a learning resource.

## Topics

- Python
- Dynamical Systems
- Time Series Analysis
- Nonlinear Measures
- Chaos Theory
- Fractal Dimension
- Entropy
- Data Science

## Repository Information

Last analyzed by OSRepos: Thu Dec 18 2025 20:00:40 GMT+0000 (Western European Standard Time)
Detail views: 7
GitHub clicks: 9

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

nolds is a small, numpy-based Python library designed for implementing and learning about nonlinear measures for dynamical systems, specifically based on one-dimensional time series. It offers a comprehensive suite of tools for analyzing the complexity, predictability, and memory of time series data.

Key measures implemented in nolds include:
*   **Sample Entropy (sampen)**: Measures time-series complexity.
*   **Correlation Dimension (corr_dim)**: Quantifies the fractal dimension and complexity.
*   **Lyapunov Exponent (lyap_r, lyap_e)**: Indicates chaos and unpredictability in a system.
*   **Hurst Exponent (hurst_rs)**: Measures long-term memory, useful for analyzing trends.
*   **Detrended Fluctuation Analysis (DFA)**: Estimates the Hurst parameter for non-stationary processes.
*   **Generalized Hurst Exponent (mfhurst_b)**: A generalization for multifractal data series.

## Installation

nolds supports Python 2 (>= 2.7) and Python 3 (>= 3.4) and primarily requires the numpy package.

You can easily install nolds using pip:

bash
pip install nolds


Optional dependencies for extended functionality include `sklearn` for RANSAC line fitting, `quantumrandom` for true random numbers, and `matplotlib` for plotting functions in `nolds.examples`.

## Examples

Here's a quick example demonstrating how to use nolds to calculate the Detrended Fluctuation Analysis (DFA) for a random walk:

python
import nolds
import numpy as np

rwalk = np.cumsum(np.random.random(1000))
h = nolds.dfa(rwalk)
print(f"Hurst parameter (DFA): {h}")


## Why Use nolds?

nolds stands out as a valuable tool for researchers and developers working with time series data due to several reasons:
*   **Comprehensive Measures**: It provides a wide array of nonlinear measures, from entropy to fractal dimensions and Lyapunov exponents, all in one library.
*   **Learning Resource**: Each function comes with extensive documentation explaining the algorithm and pointing to relevant academic papers, making it an excellent educational tool.
*   **Non-Stationary Data**: Its Detrended Fluctuation Analysis (DFA) is particularly useful for analyzing non-stationary processes, which are common in real-world data like financial markets.
*   **Pythonic and NumPy-based**: Built on NumPy, nolds integrates seamlessly into the Python scientific computing ecosystem, ensuring efficiency and ease of use.

## Links

*   **GitHub Repository**: [CSchoel/nolds](https://github.com/CSchoel/nolds){:target="_blank"}
*   **HTML Documentation**: [nolds Documentation](https://cschoel.github.io/nolds/){:target="_blank"}
*   **Read the Docs**: [nolds on Read the Docs](http://nolds.readthedocs.io/){:target="_blank"}
*   **Zenodo Reference**: [Cite nolds](http://doi.org/10.5281/zenodo.3814723){:target="_blank"}