PySDKit 0.4.12__tar.gz → 0.4.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PKG-INFO +2 -3
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PySDKit.egg-info/PKG-INFO +2 -3
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PySDKit.egg-info/SOURCES.txt +10 -7
- {pysdkit-0.4.12 → pysdkit-0.4.13}/README.md +1 -2
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/__init__.py +7 -1
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/data/__init__.py +3 -0
- pysdkit-0.4.13/pysdkit/data/_time_series.py +137 -0
- pysdkit-0.4.13/pysdkit/emd/__init__.py +23 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/_find_extrema.py +1 -1
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/ceemdan.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/eemd.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/emd.py +10 -5
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/memd.py +4 -0
- pysdkit-0.4.13/pysdkit/emd/remd.py +538 -0
- {pysdkit-0.4.12/pysdkit/tvf_emd → pysdkit-0.4.13/pysdkit/emd}/tvf_emd.py +10 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ewt/ewt.py +7 -1
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/faemd/faemd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/faemd/md_faemd.py +11 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/faemd/mv_faemd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/hvd/hvd.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/itd/itd.py +16 -6
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/jmd/jmd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/jmd/mjmd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/lmd/lmd.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/lmd/rlmd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/plot/_plot_images.py +49 -27
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ssa/ssa.py +4 -0
- pysdkit-0.4.13/pysdkit/tsa/__init__.py +8 -0
- pysdkit-0.4.13/pysdkit/tsa/_moving_decomp.py +238 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/__init__.py +13 -10
- pysdkit-0.4.13/pysdkit/utils/_cite.py +8 -0
- pysdkit-0.4.12/pysdkit/utils/instantaneous.py → pysdkit-0.4.13/pysdkit/utils/_instantaneous.py +16 -2
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_smooth1d.py +4 -3
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/acmd.py +13 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/avmd.py +3 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/ba_acmd.py +7 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/base.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/mvmd.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/vmd_c.py +4 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd2d/vmd2d.py +14 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vncmd/vncmd.py +6 -1
- {pysdkit-0.4.12 → pysdkit-0.4.13}/setup.py +1 -1
- pysdkit-0.4.12/pysdkit/emd/__init__.py +0 -14
- pysdkit-0.4.12/pysdkit/emd/remd.py +0 -28
- pysdkit-0.4.12/pysdkit/tvf_emd/__init__.py +0 -7
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PySDKit.egg-info/dependency_links.txt +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PySDKit.egg-info/requires.txt +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/PySDKit.egg-info/top_level.txt +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/data/_add_noise.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/data/_generator.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/data/_image.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/data/texture.txt +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/_prepare_points.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd/_splines.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd2d/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd2d/bemd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd2d/bmemd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/emd2d/emd2d.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/esmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/esmd/esmd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ewt/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ewt/ewt2d.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/faemd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/fmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/fmd/fmd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/hht/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/hht/hht.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/hvd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ifd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/itd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/jmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/lmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/plot/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/plot/_fourier_spectra.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/plot/_functions.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/plot/_plot_imfs.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/ssa/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_Index_of_Orthogonality.py +0 -0
- /pysdkit-0.4.12/pysdkit/utils/correlation.py → /pysdkit-0.4.13/pysdkit/utils/_correlation.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_diagnalization.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_differ.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_fft.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_function.py +0 -0
- /pysdkit-0.4.12/pysdkit/utils/hilbert.py → /pysdkit-0.4.13/pysdkit/utils/_hilbert.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_kernel_matrix.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_lags.py +0 -0
- /pysdkit-0.4.12/pysdkit/utils/mirror.py → /pysdkit-0.4.13/pysdkit/utils/_mirror.py +0 -0
- /pysdkit-0.4.12/pysdkit/utils/process.py → /pysdkit-0.4.13/pysdkit/utils/_process.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/utils/_types.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/svmd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd/vmd_f.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vmd2d/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vncmd/__init__.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vncmd/anvcmd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/pysdkit/vncmd/mncmd.py +0 -0
- {pysdkit-0.4.12 → pysdkit-0.4.13}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: PySDKit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.13
|
|
4
4
|
Summary: A Python library for signal decomposition algorithms with a unified interface.
|
|
5
5
|
Home-page: https://github.com/wwhenxuan/PySDKit
|
|
6
6
|
Author: whenxuan
|
|
@@ -43,7 +43,6 @@ Dynamic: summary
|
|
|
43
43
|

|
|
44
44
|
[](https://www.python.org/)
|
|
45
45
|
[](https://pepy.tech/project/pysdkit)
|
|
46
|
-

|
|
47
46
|
[](https://github.com/psf/black)
|
|
48
47
|
|
|
49
48
|
A Python library for signal decomposition algorithms 🥳
|
|
@@ -132,7 +131,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
132
131
|
| [`BEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bemd.py) (Bidimensional Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0262885603000945) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/BEMD.py) | ✖️ |
|
|
133
132
|
| [`CEMD`]() (Complex Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/abstract/document/4063369) | [[code]]() | ✖️ |
|
|
134
133
|
| [`EEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/eemd.py) (Ensemble Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/topics/physics-and-astronomy/ensemble-empirical-mode-decomposition) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
135
|
-
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) |
|
|
134
|
+
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) | ✔️ |
|
|
136
135
|
| [`BMEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bmemd.py) (Bidimensional Multivariate Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/8805082) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/72343-bidimensional-multivariate-empirical-mode-decomposition?s_tid=FX_rc1_behav) | ✖️ |
|
|
137
136
|
| [`CEEMDAN`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/ceemdan.py) (Complete Ensemble EMD with Adaptive Noise) | [[paper]](https://ieeexplore.ieee.org/document/5947265) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
138
137
|
| [`TVF_EMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tvf_emd/tvf_emd.py) (Time Varying Filter Based EMD) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168417301135) | [[code]](https://github.com/stfbnc/pytvfemd/tree/master) | ✔️ |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: PySDKit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.13
|
|
4
4
|
Summary: A Python library for signal decomposition algorithms with a unified interface.
|
|
5
5
|
Home-page: https://github.com/wwhenxuan/PySDKit
|
|
6
6
|
Author: whenxuan
|
|
@@ -43,7 +43,6 @@ Dynamic: summary
|
|
|
43
43
|

|
|
44
44
|
[](https://www.python.org/)
|
|
45
45
|
[](https://pepy.tech/project/pysdkit)
|
|
46
|
-

|
|
47
46
|
[](https://github.com/psf/black)
|
|
48
47
|
|
|
49
48
|
A Python library for signal decomposition algorithms 🥳
|
|
@@ -132,7 +131,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
132
131
|
| [`BEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bemd.py) (Bidimensional Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0262885603000945) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/BEMD.py) | ✖️ |
|
|
133
132
|
| [`CEMD`]() (Complex Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/abstract/document/4063369) | [[code]]() | ✖️ |
|
|
134
133
|
| [`EEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/eemd.py) (Ensemble Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/topics/physics-and-astronomy/ensemble-empirical-mode-decomposition) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
135
|
-
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) |
|
|
134
|
+
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) | ✔️ |
|
|
136
135
|
| [`BMEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bmemd.py) (Bidimensional Multivariate Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/8805082) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/72343-bidimensional-multivariate-empirical-mode-decomposition?s_tid=FX_rc1_behav) | ✖️ |
|
|
137
136
|
| [`CEEMDAN`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/ceemdan.py) (Complete Ensemble EMD with Adaptive Noise) | [[paper]](https://ieeexplore.ieee.org/document/5947265) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
138
137
|
| [`TVF_EMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tvf_emd/tvf_emd.py) (Time Varying Filter Based EMD) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168417301135) | [[code]](https://github.com/stfbnc/pytvfemd/tree/master) | ✔️ |
|
|
@@ -10,6 +10,7 @@ pysdkit/data/__init__.py
|
|
|
10
10
|
pysdkit/data/_add_noise.py
|
|
11
11
|
pysdkit/data/_generator.py
|
|
12
12
|
pysdkit/data/_image.py
|
|
13
|
+
pysdkit/data/_time_series.py
|
|
13
14
|
pysdkit/data/texture.txt
|
|
14
15
|
pysdkit/emd/__init__.py
|
|
15
16
|
pysdkit/emd/_find_extrema.py
|
|
@@ -20,6 +21,7 @@ pysdkit/emd/eemd.py
|
|
|
20
21
|
pysdkit/emd/emd.py
|
|
21
22
|
pysdkit/emd/memd.py
|
|
22
23
|
pysdkit/emd/remd.py
|
|
24
|
+
pysdkit/emd/tvf_emd.py
|
|
23
25
|
pysdkit/emd2d/__init__.py
|
|
24
26
|
pysdkit/emd2d/bemd.py
|
|
25
27
|
pysdkit/emd2d/bmemd.py
|
|
@@ -55,23 +57,24 @@ pysdkit/plot/_plot_images.py
|
|
|
55
57
|
pysdkit/plot/_plot_imfs.py
|
|
56
58
|
pysdkit/ssa/__init__.py
|
|
57
59
|
pysdkit/ssa/ssa.py
|
|
58
|
-
pysdkit/
|
|
59
|
-
pysdkit/
|
|
60
|
+
pysdkit/tsa/__init__.py
|
|
61
|
+
pysdkit/tsa/_moving_decomp.py
|
|
60
62
|
pysdkit/utils/_Index_of_Orthogonality.py
|
|
61
63
|
pysdkit/utils/__init__.py
|
|
64
|
+
pysdkit/utils/_cite.py
|
|
65
|
+
pysdkit/utils/_correlation.py
|
|
62
66
|
pysdkit/utils/_diagnalization.py
|
|
63
67
|
pysdkit/utils/_differ.py
|
|
64
68
|
pysdkit/utils/_fft.py
|
|
65
69
|
pysdkit/utils/_function.py
|
|
70
|
+
pysdkit/utils/_hilbert.py
|
|
71
|
+
pysdkit/utils/_instantaneous.py
|
|
66
72
|
pysdkit/utils/_kernel_matrix.py
|
|
67
73
|
pysdkit/utils/_lags.py
|
|
74
|
+
pysdkit/utils/_mirror.py
|
|
75
|
+
pysdkit/utils/_process.py
|
|
68
76
|
pysdkit/utils/_smooth1d.py
|
|
69
77
|
pysdkit/utils/_types.py
|
|
70
|
-
pysdkit/utils/correlation.py
|
|
71
|
-
pysdkit/utils/hilbert.py
|
|
72
|
-
pysdkit/utils/instantaneous.py
|
|
73
|
-
pysdkit/utils/mirror.py
|
|
74
|
-
pysdkit/utils/process.py
|
|
75
78
|
pysdkit/vmd/__init__.py
|
|
76
79
|
pysdkit/vmd/acmd.py
|
|
77
80
|
pysdkit/vmd/avmd.py
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|

|
|
7
7
|
[](https://www.python.org/)
|
|
8
8
|
[](https://pepy.tech/project/pysdkit)
|
|
9
|
-

|
|
10
9
|
[](https://github.com/psf/black)
|
|
11
10
|
|
|
12
11
|
A Python library for signal decomposition algorithms 🥳
|
|
@@ -95,7 +94,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
95
94
|
| [`BEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bemd.py) (Bidimensional Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0262885603000945) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/BEMD.py) | ✖️ |
|
|
96
95
|
| [`CEMD`]() (Complex Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/abstract/document/4063369) | [[code]]() | ✖️ |
|
|
97
96
|
| [`EEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/eemd.py) (Ensemble Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/topics/physics-and-astronomy/ensemble-empirical-mode-decomposition) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
98
|
-
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) |
|
|
97
|
+
| [`REMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/remd.py) (Robust Empirical Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0019057821003785) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/70032-robust-empirical-mode-decomposition-remd) | ✔️ |
|
|
99
98
|
| [`BMEMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd2d/bmemd.py) (Bidimensional Multivariate Empirical Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/8805082) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/72343-bidimensional-multivariate-empirical-mode-decomposition?s_tid=FX_rc1_behav) | ✖️ |
|
|
100
99
|
| [`CEEMDAN`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/emd/ceemdan.py) (Complete Ensemble EMD with Adaptive Noise) | [[paper]](https://ieeexplore.ieee.org/document/5947265) | [[code]](https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EEMD.py) | ✔️ |
|
|
101
100
|
| [`TVF_EMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tvf_emd/tvf_emd.py) (Time Varying Filter Based EMD) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168417301135) | [[code]](https://github.com/stfbnc/pytvfemd/tree/master) | ✔️ |
|
|
@@ -7,11 +7,14 @@ from .emd import EEMD
|
|
|
7
7
|
# 具有自适应噪声的完全集合经验模态分解
|
|
8
8
|
from .emd import CEEMDAN
|
|
9
9
|
|
|
10
|
+
# 稳健经验模态分解
|
|
11
|
+
from .emd import REMD
|
|
12
|
+
|
|
10
13
|
# 多元变分模态分解算法
|
|
11
14
|
from .emd import MEMD
|
|
12
15
|
|
|
13
16
|
# 基于时变滤波器的经验模态分解
|
|
14
|
-
from .
|
|
17
|
+
from .emd import TVF_EMD
|
|
15
18
|
|
|
16
19
|
# 希尔伯特震动分解
|
|
17
20
|
from .hvd import HVD
|
|
@@ -45,3 +48,6 @@ from .vncmd import VNCMD
|
|
|
45
48
|
|
|
46
49
|
# 经验小波变换
|
|
47
50
|
from .ewt import ewt, EWT
|
|
51
|
+
|
|
52
|
+
# 滑动平均分解
|
|
53
|
+
from .tsa import Moving_Decomp
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
Created on 2025/02/10 18:35:29
|
|
4
|
+
@author: Whenxuan Wang
|
|
5
|
+
@email: wwhenxuan@gmail.com
|
|
6
|
+
Generate time series test examples
|
|
7
|
+
"""
|
|
8
|
+
import numpy as np
|
|
9
|
+
from typing import Optional, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def simulate_seasonal_term(
|
|
13
|
+
periodicity: Union[float, np.ndarray],
|
|
14
|
+
total_cycles: Union[float, np.ndarray],
|
|
15
|
+
noise_std: Union[float, np.ndarray] = 1.0,
|
|
16
|
+
harmonics=None,
|
|
17
|
+
) -> np.ndarray:
|
|
18
|
+
"""
|
|
19
|
+
This function is adapted from the famous statistical analysis library in Python, statsmodels.
|
|
20
|
+
It synthesizes time series data based on a specified periodicity, number of cycles, and noise.
|
|
21
|
+
|
|
22
|
+
Code reference: https://www.statsmodels.org/stable/examples/notebooks/generated/statespace_seasonal.html
|
|
23
|
+
|
|
24
|
+
:param periodicity: The length of one cycle in the seasonal pattern (e.g., the number of time steps per cycle).
|
|
25
|
+
:param total_cycles: The total number of full cycles to generate in the time series data.
|
|
26
|
+
:param noise_std: The standard deviation of the noise to be added to the seasonal components.
|
|
27
|
+
:param harmonics: The number of harmonics (sinusoidal components) used to generate the seasonal pattern.
|
|
28
|
+
If None, it defaults to half the periodicity.
|
|
29
|
+
:return: A numpy array representing the generated time series data with seasonal behavior.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
# Calculate the total duration of the time series (in terms of time steps).
|
|
33
|
+
duration = periodicity * total_cycles
|
|
34
|
+
# Ensure that the total duration is an integer.
|
|
35
|
+
assert duration == int(duration)
|
|
36
|
+
duration = int(duration)
|
|
37
|
+
|
|
38
|
+
# Set the number of harmonics if not provided. Default is half the periodicity.
|
|
39
|
+
harmonics = harmonics if harmonics else int(np.floor(periodicity / 2))
|
|
40
|
+
|
|
41
|
+
# Calculate the angular frequency corresponding to the periodicity.
|
|
42
|
+
lambda_p = 2 * np.pi / float(periodicity)
|
|
43
|
+
|
|
44
|
+
# Initialize the seasonal noise components for each harmonic (both cosine and sine components).
|
|
45
|
+
gamma_jt = noise_std * np.random.randn(harmonics)
|
|
46
|
+
gamma_star_jt = noise_std * np.random.randn(harmonics)
|
|
47
|
+
|
|
48
|
+
# Define the total number of time steps, including extra time for burn-in.
|
|
49
|
+
total_timesteps = 100 * duration # Pad for burn-in phase
|
|
50
|
+
# Initialize an array to hold the generated time series.
|
|
51
|
+
series = np.zeros(total_timesteps)
|
|
52
|
+
|
|
53
|
+
# Loop over each time step to generate the time series data.
|
|
54
|
+
for t in range(total_timesteps):
|
|
55
|
+
# Initialize new gamma values for the next time step.
|
|
56
|
+
gamma_jtp1 = np.zeros_like(gamma_jt)
|
|
57
|
+
gamma_star_jtp1 = np.zeros_like(gamma_star_jt)
|
|
58
|
+
|
|
59
|
+
# For each harmonic, update its seasonal components (cosine and sine) based on the previous values.
|
|
60
|
+
for j in range(1, harmonics + 1):
|
|
61
|
+
# Calculate the cosine and sine values for this harmonic.
|
|
62
|
+
cos_j = np.cos(lambda_p * j)
|
|
63
|
+
sin_j = np.sin(lambda_p * j)
|
|
64
|
+
|
|
65
|
+
# Update the gamma values for the next time step using a recursive process.
|
|
66
|
+
gamma_jtp1[j - 1] = (
|
|
67
|
+
gamma_jt[j - 1] * cos_j
|
|
68
|
+
+ gamma_star_jt[j - 1] * sin_j
|
|
69
|
+
+ noise_std * np.random.randn()
|
|
70
|
+
)
|
|
71
|
+
gamma_star_jtp1[j - 1] = (
|
|
72
|
+
-gamma_jt[j - 1] * sin_j
|
|
73
|
+
+ gamma_star_jt[j - 1] * cos_j
|
|
74
|
+
+ noise_std * np.random.randn()
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# Assign the new gamma values to the time series for the current time step.
|
|
78
|
+
series[t] = np.sum(gamma_jtp1)
|
|
79
|
+
|
|
80
|
+
# Move to the next time step.
|
|
81
|
+
gamma_jt = gamma_jtp1
|
|
82
|
+
gamma_star_jt = gamma_star_jtp1
|
|
83
|
+
|
|
84
|
+
# After generating the series, discard the burn-in period and return the desired portion of the time series.
|
|
85
|
+
wanted_series = series[-duration:] # Discard burn-in phase
|
|
86
|
+
|
|
87
|
+
return wanted_series
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def generate_time_series(
|
|
91
|
+
duration: int = 300,
|
|
92
|
+
periodicities: np.ndarray = np.array([10, 30, 50]),
|
|
93
|
+
num_harmonics: np.ndarray = np.array([3, 2, 2]),
|
|
94
|
+
std: np.ndarray = np.array([2, 3, 5]),
|
|
95
|
+
seed: Optional[int] = 42,
|
|
96
|
+
) -> np.ndarray:
|
|
97
|
+
"""
|
|
98
|
+
Generates a time series data by combining multiple seasonal components with different periodicities,
|
|
99
|
+
numbers of harmonics, and noise levels. Each component represents a periodic signal, and the final
|
|
100
|
+
series is the sum of these components.
|
|
101
|
+
|
|
102
|
+
:param duration: The length of the time series to generate, in terms of number of time steps.
|
|
103
|
+
:param periodicities: An array of the periodicities (number of time steps per cycle) for each seasonal component.
|
|
104
|
+
:param num_harmonics: An array specifying the number of harmonics (sinusoidal components) to use for each seasonal component.
|
|
105
|
+
:param std: An array of standard deviations of the noise for each seasonal component. The noise is added to each harmonic.
|
|
106
|
+
:param seed: A random seed for reproducibility. If None, a random seed is used.
|
|
107
|
+
:return: A numpy array representing the generated time series that combines all the seasonal components.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
# Set the random seed for reproducibility of the results (if provided).
|
|
111
|
+
np.random.seed(seed=seed)
|
|
112
|
+
|
|
113
|
+
# List to store the seasonal components that will be combined to form the final series.
|
|
114
|
+
terms = []
|
|
115
|
+
|
|
116
|
+
# Loop through each input periodicity and generate a seasonal time series for each.
|
|
117
|
+
for ix, _ in enumerate(periodicities):
|
|
118
|
+
# For each periodicity, generate a seasonal time series using the simulate_seasonal_term function.
|
|
119
|
+
s = simulate_seasonal_term(
|
|
120
|
+
periodicity=periodicities[
|
|
121
|
+
ix
|
|
122
|
+
], # The length of the cycle for this component.
|
|
123
|
+
total_cycles=duration
|
|
124
|
+
/ periodicities[
|
|
125
|
+
ix
|
|
126
|
+
], # Number of cycles to generate based on the total duration.
|
|
127
|
+
harmonics=num_harmonics[ix], # Number of harmonics for this component.
|
|
128
|
+
noise_std=std[ix], # Standard deviation of noise for this component.
|
|
129
|
+
)
|
|
130
|
+
# Append the generated seasonal component to the list of terms.
|
|
131
|
+
terms.append(s)
|
|
132
|
+
|
|
133
|
+
# Combine all the seasonal components (terms) by summing them together element-wise.
|
|
134
|
+
series = np.sum(terms, axis=0)
|
|
135
|
+
|
|
136
|
+
# Return the final time series, which is a combination of the different seasonal components.
|
|
137
|
+
return series
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
Created on 2025/02/03 18:36:18
|
|
4
|
+
@author: Whenxuan Wang
|
|
5
|
+
@email: wwhenxuan@gmail.com
|
|
6
|
+
"""
|
|
7
|
+
from ._splines import akima, cubic, pchip, cubic_hermite, cubic_spline_3pts
|
|
8
|
+
|
|
9
|
+
from ._find_extrema import find_extrema_parabol, find_extrema_simple
|
|
10
|
+
|
|
11
|
+
from ._prepare_points import prepare_points_parabol, prepare_points_simple
|
|
12
|
+
|
|
13
|
+
from .emd import EMD
|
|
14
|
+
|
|
15
|
+
from .eemd import EEMD
|
|
16
|
+
|
|
17
|
+
from .ceemdan import CEEMDAN
|
|
18
|
+
|
|
19
|
+
from .remd import REMD
|
|
20
|
+
|
|
21
|
+
from .memd import MEMD
|
|
22
|
+
|
|
23
|
+
from .tvf_emd import TVF_EMD
|
|
@@ -7,7 +7,7 @@ The following code is mainly used to find extreme points in the EMD algorithm
|
|
|
7
7
|
Code taken from https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EMD.py
|
|
8
8
|
"""
|
|
9
9
|
import numpy as np
|
|
10
|
-
from pysdkit.utils.
|
|
10
|
+
from pysdkit.utils._process import not_duplicate, find_zero_crossings
|
|
11
11
|
from typing import Tuple
|
|
12
12
|
|
|
13
13
|
FindExtremaOutput = Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
|
|
@@ -125,6 +125,10 @@ class CEEMDAN(object):
|
|
|
125
125
|
signal=signal, time=time, max_imfs=max_imfs, progress=progress
|
|
126
126
|
)
|
|
127
127
|
|
|
128
|
+
def __str__(self) -> str:
|
|
129
|
+
"""Get the full name and abbreviation of the algorithm"""
|
|
130
|
+
return "Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN)"
|
|
131
|
+
|
|
128
132
|
def generate_noise(
|
|
129
133
|
self, scale: float, size: Union[int, Sequence[int]]
|
|
130
134
|
) -> np.ndarray:
|
|
@@ -101,6 +101,10 @@ class EEMD(object):
|
|
|
101
101
|
"""allow instances to be called like functions"""
|
|
102
102
|
return self.fit_transform(signal, time, max_imfs, progress)
|
|
103
103
|
|
|
104
|
+
def __str__(self) -> str:
|
|
105
|
+
"""Get the full name and abbreviation of the algorithm"""
|
|
106
|
+
return "Ensemble Empirical Mode Decomposition (EEMD)"
|
|
107
|
+
|
|
104
108
|
def generate_noise(
|
|
105
109
|
self, scale: float, size: Union[int, Sequence[int]]
|
|
106
110
|
) -> np.ndarray:
|
|
@@ -8,11 +8,11 @@ Code taken from https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EMD.py
|
|
|
8
8
|
import numpy as np
|
|
9
9
|
from numpy import ndarray
|
|
10
10
|
from scipy.interpolate import interp1d
|
|
11
|
-
from typing import Optional, Tuple
|
|
11
|
+
from typing import Optional, Tuple
|
|
12
12
|
|
|
13
|
-
from .
|
|
14
|
-
from .
|
|
15
|
-
from .
|
|
13
|
+
from pysdkit.emd import akima, cubic, pchip, cubic_hermite, cubic_spline_3pts
|
|
14
|
+
from pysdkit.emd import find_extrema_parabol, find_extrema_simple
|
|
15
|
+
from pysdkit.emd import prepare_points_parabol, prepare_points_simple
|
|
16
16
|
|
|
17
17
|
from pysdkit.utils import get_timeline, normalize_signal, common_dtype
|
|
18
18
|
|
|
@@ -20,6 +20,7 @@ from pysdkit.utils import get_timeline, normalize_signal, common_dtype
|
|
|
20
20
|
class EMD(object):
|
|
21
21
|
"""
|
|
22
22
|
Empirical Mode Decomposition
|
|
23
|
+
|
|
23
24
|
Huang, Norden E., et al.
|
|
24
25
|
"The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis."
|
|
25
26
|
Proceedings of the Royal Society of London.
|
|
@@ -92,6 +93,10 @@ class EMD(object):
|
|
|
92
93
|
"""allow instances to be called like functions"""
|
|
93
94
|
return self.fit_transform(signal=signal, time=time, max_imfs=max_imfs)
|
|
94
95
|
|
|
96
|
+
def __str__(self) -> str:
|
|
97
|
+
"""Get the full name and abbreviation of the algorithm"""
|
|
98
|
+
return "Empirical Mode Decomposition (EMD)"
|
|
99
|
+
|
|
95
100
|
@staticmethod
|
|
96
101
|
def _check_length(signal: np.ndarray, time: Optional[np.ndarray] = None):
|
|
97
102
|
"""Check input timing and signal length are equal"""
|
|
@@ -140,7 +145,7 @@ class EMD(object):
|
|
|
140
145
|
max_val: np.ndarray,
|
|
141
146
|
min_pos: np.ndarray,
|
|
142
147
|
min_val: np.ndarray,
|
|
143
|
-
):
|
|
148
|
+
) -> Tuple[np.ndarray, np.ndarray]:
|
|
144
149
|
"""
|
|
145
150
|
Further processing of the maximum and minimum points of the input signal makes the upper and lower envelope spectra smoother.
|
|
146
151
|
:param time: position or time array of numpy
|
|
@@ -87,6 +87,10 @@ class MEMD(object):
|
|
|
87
87
|
"""allow instances to be called like functions"""
|
|
88
88
|
return self.fit_transform(signal=signal)
|
|
89
89
|
|
|
90
|
+
def __str__(self) -> str:
|
|
91
|
+
"""Get the full name and abbreviation of the algorithm"""
|
|
92
|
+
return "Multivariate Empirical Mode Decomposition (MEMD)"
|
|
93
|
+
|
|
90
94
|
def init_hammersley(self, N_dim: int) -> np.ndarray:
|
|
91
95
|
"""Initializations for Hammersley function"""
|
|
92
96
|
base = [-self.n_dir]
|