A Python library for Singular Spectrum Analysis (SSA)
Project description
SSA Tools: Accelerated Singular Spectrum Analysis
A Python package for Singular Spectrum Analysis (SSA) with accelerated performance for large datasets. Overview
Singular Spectrum Analysis (SSA) is a powerful method for time-series decomposition based on spectral decomposition. However, the classical implementation of SSA is computationally expensive, limiting its application to small datasets.
This package provides an accelerated SSA function, allowing SSA to be applied to large datasets within a reasonable time.
Why Use This Package?
-
Fast & efficient implementation
-
Works with large time-series data, even with sensor signals with sampling up to 2 MHz!
-
Supports both classic and accelerated SSA
Installation
You can install the package using:
pip install git+https://github.com/TinoDerb/ssa_tools.git
Or, if using PyPI:
pip install ssa_tools
Usage
import numpy as np
import ssa_tools
signal = np.sin(np.linspace(0, 10, 100)) # Generate a sample signal
components = ssa_tools.SSA(signal, lag=20, numComp=5, method="classic") # Apply SSA (classic method)
components_fast = ssa_tools.SSA(signal, lag=20, numComp=5, method="accelerated") # Apply SSA (accelerated method)
print(components.shape) # (100, 5)
print(components_fast.shape) # (100, 5)
Features
Classic SSA: Based on Singular Value Decomposition (SVD)
Accelerated SSA: Uses Numba, Joblib, and parallel processing
Reference & Citation
If you use this package in a publication, please cite:
Publication: Accelerated Singular Spectrum Analysis and Machine Learning to investigate wood machining acoustics
Journal: Mechanical Systems and Signal Processing
DOI: https://doi.org/10.1016/j.ymssp.2024.111879
License
This package is licensed under the MIT License.
Future version
In future versions, I plan to extend the capabilities to include:
-
Variance explained by each component
-
Weighted Correlation Analysis between the reconstructed components and the original data
-
Automatic parameter selection for SSA optimization
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssa_tools-0.1.1.tar.gz.
File metadata
- Download URL: ssa_tools-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41ac70a90e7c931e1ac483eafbe40c6d1c856e31d760f942aac1ab70be3b2659
|
|
| MD5 |
7355759d311188299490488cdc3edc1c
|
|
| BLAKE2b-256 |
c01d3feb1293f1c171108e4f902c930b37f2097c5d610d4c009ac67eab38cfc0
|
File details
Details for the file ssa_tools-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ssa_tools-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87d1bd48efe622e828a69084c0b76d962be61a42b517af4e5be063f787cf7e2
|
|
| MD5 |
172f10baf56f88418fb1153c6cda6176
|
|
| BLAKE2b-256 |
8c04b6f0af41bb1a743b8c50530befc6d7b729b35d8f36fa28a49cc720851ee6
|