Skip to main content

Py1DTDF

This Python package provides a comprehensive set of standard, fractal, nonlinear, and information-theoretic time-domain features for 1-D signals. The features are computed using an adjustable sliding window and overlap mechanism, allowing flexibility in analyzing different segments of a signal.Hence the name 1DTDF : 1-Dimensional Time-Domain Features.

Features

1. Standard Time-Domain Features

These features capture the statistical and structural properties of the signal over time.

  • Mean: Measures the central tendency of the signal (Wikipedia).
  • Standard Deviation: Measures the variability of the signal (Wikipedia).
  • RMS (Root Mean Square): Measures the magnitude of the signal (Wikipedia).
  • Skewness: Measures the asymmetry of the signal distribution (Wikipedia).
  • Kurtosis: Measures the "tailedness" of the signal distribution (Wikipedia).
  • Zero-Crossing Rate: Measures how often the signal crosses zero (Wikipedia).
  • Maximum Value: Returns the maximum value in the window (Wikipedia).
  • Minimum Value: Returns the minimum value in the window (Wikipedia).
  • Peak-to-Peak: Measures the range between maximum and minimum values (Wikipedia).
  • Variance: Measures the variability of the signal (Wikipedia).
  • IQR (Interquartile Range): Measures the spread of the middle 50% of the data (Wikipedia).
  • Number of Peaks: Returns the number of peaks in the window (Wikipedia).
  • Signal Line Length: Measures the cumulative sum of absolute differences in the signal (Wikipedia).
  • Crest Factor: Ratio of the peak value to the RMS value (Wikipedia).
  • Shape Factor: Ratio of the RMS value to the mean absolute value (Wikipedia).
  • Impulse Factor: Ratio of the peak value to the mean absolute value (Wikipedia).
  • Signal Range: Difference between the maximum and minimum values (Wikipedia).
  • Mean Crossing Rate: Measures how often the signal crosses its mean value (Wikipedia).
  • Signal Variability: Standard deviation divided by the square root of the signal length (Wikipedia).
  • Peak Amplitude: Returns the peak value of the signal (Wikipedia).
  • Energy: Sum of squared values in the signal (Wikipedia).
  • Median: Returns the median value of the signal (Wikipedia).
  • Root Sum of Squares (RSS): Square root of the sum of squared values (Wikipedia).
  • DASDV: Measures the variability of differences between consecutive points (IEEE).
  • Range Ratio: Ratio of the range (max - min) to the standard deviation (Wikipedia).

2. Fractal Features

These features describe the complexity and self-similarity of the signal.

  • Higuchi Fractal Dimension: Measures complexity using Higuchi's algorithm (Scientific Article).
  • Hurst Exponent: Measures the long-term memory of the signal (Wikipedia).
  • Lyapunov Exponent: Indicates chaos in the signal by measuring sensitivity to initial conditions (Wikipedia).
  • Katz Fractal Dimension: Measures signal complexity using Katz's method (IEEE).
  • Petrosian Fractal Dimension: Measures complexity by detecting changes in signal direction (IEEE).
  • Box-Counting Fractal Dimension: Uses the box-counting method to estimate fractal dimension (Wikipedia).
  • Correlation Dimension: Estimates the fractal dimension using the correlation integral (Wikipedia).

3. Complexity and Nonlinear Features

These features capture the irregularity, randomness, or chaotic nature of the signal.

  • Approximate Entropy: Measures the complexity and unpredictability of the signal (Wikipedia).
  • Sample Entropy: A more robust version of Approximate Entropy (Wikipedia).
  • Shannon Entropy: Measures the uncertainty or randomness of the signal (Wikipedia).
  • Lempel-Ziv Complexity: Measures the number of distinct patterns in the signal (Wikipedia).
  • Permutation Entropy: Evaluates the complexity by analyzing the order of neighboring values (Wikipedia).
  • Largest Lyapunov Exponent: Quantifies the divergence of nearby trajectories, indicating chaos (Wikipedia).
  • Mobility: Measures the rate of change in the variance of the signal (Wikipedia).

4. Information-Theoretic Features

These features quantify the information content and uncertainty in the signal.

  • Entropy: Shannon entropy of the signal (Wikipedia).
  • Mutual Information: Measures the shared information between two parts of the signal (Wikipedia).
  • Symbolic Dynamics Entropy: Measures randomness in symbolic transitions (Wikipedia).
  • Conditional Entropy: The entropy of the signal conditioned on its past values (Wikipedia).

5. Statistical Moments and Distribution-Based Features

These features capture statistical properties of the signal distribution.

  • Higher-Order Moments: Measures higher-order statistical moments (up to 6th order) (Wikipedia).
  • Percentiles: Returns a specific percentile of the signal (Wikipedia).
  • L-Moments: Linear combinations of order statistics to describe the shape of the distribution (Wikipedia).
  • Quantile Range: Measures the spread between upper and lower percentiles (Wikipedia).
  • Autoregressive Coefficients: Coefficients from an autoregressive model fitted to the signal (Wikipedia).

6. Geometric and Recurrence-Based Features

These features analyze the geometric structure of the signal trajectory and its recurrence.

  • Recurrence Quantification: Measures the recurrence patterns of the signal (Wikipedia).
  • Attractor Reconstruction: Reconstructs the attractor of the signal in phase space (Wikipedia).
  • Mean Crossing Rate: Measures how often the signal crosses its mean value (Wikipedia).
  • Max Slope: Measures the steepest slope between consecutive points (Wikipedia).

Installation

To install the package, run:

pip install py1dtdf

Usage

The software is licensed under the MIT License. Please see LICENSE file for more details.

import numpy as np
from py1dtdf import all_features

# Example signal
signal = np.sin(np.linspace(0, 10, 1000))  # Sine wave signal

# Set window size and overlap
window_size = 200
overlap = 100

# Compute all features for the signal
features = all_features(signal, window_size, overlap)

# Print all features
for feature_name, feature_values in features.items():
    print(f"{feature_name}: {feature_values}")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py1dtdf-1.1.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

py1dtdf-1.1.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file py1dtdf-1.1.1.tar.gz.

File metadata

  • Download URL: py1dtdf-1.1.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for py1dtdf-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6f5dd399788bf1c0a10070d76b28bf36f0b802f3fd73cdac158f3768a77d682f
MD5 4f78e66a3cf2fbafd666bff4d4e8429d
BLAKE2b-256 5f70c0441c4fe216e461d4ef001cf84a3f8b12d346082ab16d6ade61addbf2e8

See more details on using hashes here.

File details

Details for the file py1dtdf-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: py1dtdf-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for py1dtdf-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec26761ef86f3f97573823e39234aaad9d55fe05f364dc9cea193e37ddb22953
MD5 5add3f7fc17c6c98919c2e345a46f0ea
BLAKE2b-256 8047b4fb361e37c4deb586d1688652df3cb7e38cf6485aed56c93ba94584b048

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page