PySDKit 0.4.24__tar.gz → 0.4.26__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.
Files changed (156) hide show
  1. {pysdkit-0.4.24 → pysdkit-0.4.26}/PKG-INFO +31 -14
  2. {pysdkit-0.4.24 → pysdkit-0.4.26}/PySDKit.egg-info/PKG-INFO +31 -14
  3. {pysdkit-0.4.24 → pysdkit-0.4.26}/PySDKit.egg-info/SOURCES.txt +4 -2
  4. pysdkit-0.4.26/pyproject.toml +66 -0
  5. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/__init__.py +6 -2
  6. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/emd.py +2 -2
  7. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/hht/hht.py +4 -4
  8. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/faemd.py +2 -2
  9. pysdkit-0.4.26/pysdkit/_itd/itd.py +189 -0
  10. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vncmd/__init__.py +2 -0
  11. pysdkit-0.4.26/pysdkit/_vncmd/avncmd.py +491 -0
  12. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/entropy/_permutation_entropy.py +2 -2
  13. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/entropy/_sample_entropy.py +3 -3
  14. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/models/_pca.py +5 -5
  15. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/_fourier_spectra.py +1 -1
  16. pysdkit-0.4.26/pysdkit/tests/__init__.py +12 -0
  17. pysdkit-0.4.26/pysdkit/tests/data/__init__.py +2 -0
  18. pysdkit-0.4.26/pysdkit/tests/models/__init__.py +2 -0
  19. pysdkit-0.4.26/pysdkit/tests/models/test_knn.py +190 -0
  20. pysdkit-0.4.26/pysdkit/tests/models/test_pca.py +80 -0
  21. pysdkit-0.4.26/pysdkit/tests/run_all.py +57 -0
  22. pysdkit-0.4.26/pysdkit/tests/test_avncmd.py +127 -0
  23. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_emd.py +68 -54
  24. pysdkit-0.4.26/pysdkit/tests/test_ewt.py +166 -0
  25. pysdkit-0.4.26/pysdkit/tests/test_faemd.py +206 -0
  26. pysdkit-0.4.26/pysdkit/tests/test_itd.py +116 -0
  27. pysdkit-0.4.26/pysdkit/tests/test_lmd.py +80 -0
  28. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_moving_decomp.py +77 -55
  29. pysdkit-0.4.26/pysdkit/tests/test_rlmd.py +80 -0
  30. pysdkit-0.4.26/pysdkit/tests/test_stl.py +153 -0
  31. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_vmd.py +74 -50
  32. pysdkit-0.4.26/pysdkit/tests/test_vmd2d.py +153 -0
  33. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_correlation.py +4 -4
  34. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_function.py +3 -2
  35. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_hilbert.py +2 -2
  36. pysdkit-0.4.24/pysdkit/_itd/itd.py +0 -166
  37. pysdkit-0.4.24/pysdkit/_vncmd/avncmd.py +0 -501
  38. pysdkit-0.4.24/pysdkit/tests/__init__.py +0 -6
  39. pysdkit-0.4.24/pysdkit/tests/data/__init__.py +0 -6
  40. pysdkit-0.4.24/pysdkit/tests/models/__init__.py +0 -6
  41. pysdkit-0.4.24/pysdkit/tests/models/test_knn.py +0 -164
  42. pysdkit-0.4.24/pysdkit/tests/models/test_pca.py +0 -71
  43. pysdkit-0.4.24/pysdkit/tests/test_all.py +0 -23
  44. pysdkit-0.4.24/pysdkit/tests/test_ewt.py +0 -138
  45. pysdkit-0.4.24/pysdkit/tests/test_faemd.py +0 -170
  46. pysdkit-0.4.24/pysdkit/tests/test_lmd.py +0 -66
  47. pysdkit-0.4.24/pysdkit/tests/test_rlmd.py +0 -66
  48. pysdkit-0.4.24/pysdkit/tests/test_stl.py +0 -145
  49. pysdkit-0.4.24/pysdkit/tests/test_vmd2d.py +0 -137
  50. pysdkit-0.4.24/setup.py +0 -42
  51. {pysdkit-0.4.24 → pysdkit-0.4.26}/LICENSE +0 -0
  52. {pysdkit-0.4.24 → pysdkit-0.4.26}/PySDKit.egg-info/dependency_links.txt +0 -0
  53. {pysdkit-0.4.24 → pysdkit-0.4.26}/PySDKit.egg-info/requires.txt +0 -0
  54. {pysdkit-0.4.24 → pysdkit-0.4.26}/PySDKit.egg-info/top_level.txt +0 -0
  55. {pysdkit-0.4.24 → pysdkit-0.4.26}/README.md +0 -0
  56. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/__init__.py +0 -0
  57. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/_find_extrema.py +0 -0
  58. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/_prepare_points.py +0 -0
  59. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/_splines.py +0 -0
  60. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/ceemdan.py +0 -0
  61. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/eemd.py +0 -0
  62. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/efd.py +0 -0
  63. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/hht/__init__.py +0 -0
  64. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/hht/frequency.py +0 -0
  65. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/memd.py +0 -0
  66. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/remd.py +0 -0
  67. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd/tvf_emd.py +0 -0
  68. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd2d/__init__.py +0 -0
  69. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd2d/bemd.py +0 -0
  70. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd2d/bmemd.py +0 -0
  71. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_emd2d/emd2d.py +0 -0
  72. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_esmd/__init__.py +0 -0
  73. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_esmd/esmd.py +0 -0
  74. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ewt/__init__.py +0 -0
  75. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ewt/ewt.py +0 -0
  76. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ewt/ewt2d.py +0 -0
  77. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/__init__.py +0 -0
  78. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/extrema.py +0 -0
  79. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/faemd2d.py +0 -0
  80. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/faemd3d.py +0 -0
  81. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_faemd/filter.py +0 -0
  82. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_fmd/__init__.py +0 -0
  83. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_fmd/fmd.py +0 -0
  84. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_fmd/nfmd.py +0 -0
  85. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_hvd/__init__.py +0 -0
  86. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_hvd/hvd.py +0 -0
  87. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ifd/__init__.py +0 -0
  88. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_itd/__init__.py +0 -0
  89. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_jmd/__init__.py +0 -0
  90. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_jmd/jmd.py +0 -0
  91. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_jmd/mjmd.py +0 -0
  92. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_lmd/__init__.py +0 -0
  93. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_lmd/lmd.py +0 -0
  94. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_lmd/rlmd.py +0 -0
  95. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_osd/__init__.py +0 -0
  96. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ssa/__init__.py +0 -0
  97. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_ssa/ssa.py +0 -0
  98. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/__init__.py +0 -0
  99. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/acmd.py +0 -0
  100. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/avmd.py +0 -0
  101. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/ba_acmd.py +0 -0
  102. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/base.py +0 -0
  103. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/mvmd.py +0 -0
  104. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/svmd.py +0 -0
  105. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/vmd_c.py +0 -0
  106. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/vmd_f.py +0 -0
  107. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd/vme.py +0 -0
  108. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd2d/__init__.py +0 -0
  109. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd2d/cvmd2d.py +0 -0
  110. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vmd2d/vmd2d.py +0 -0
  111. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vncmd/incmd.py +0 -0
  112. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vncmd/mncmd.py +0 -0
  113. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/_vncmd/vncmd.py +0 -0
  114. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/__init__.py +0 -0
  115. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_add_noise.py +0 -0
  116. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_cube.py +0 -0
  117. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_generator.py +0 -0
  118. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_image.py +0 -0
  119. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_models.py +0 -0
  120. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_test_univariate.py +0 -0
  121. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/_time_series.py +0 -0
  122. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/data/texture.txt +0 -0
  123. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/entropy/__init__.py +0 -0
  124. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/entropy/_approxiamte_entropy.py +0 -0
  125. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/models/__init__.py +0 -0
  126. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/models/_base.py +0 -0
  127. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/models/_kmeans.py +0 -0
  128. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/models/_knn.py +0 -0
  129. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/__init__.py +0 -0
  130. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/_functions.py +0 -0
  131. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/_plot_images.py +0 -0
  132. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/_plot_imfs.py +0 -0
  133. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/plot/_plot_signal.py +0 -0
  134. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/data/test_generator_cube.py +0 -0
  135. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/data/test_generator_image.py +0 -0
  136. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/data/test_generator_signal.py +0 -0
  137. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/data/test_generator_univariate_signal.py +0 -0
  138. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_ceemdan.py +0 -0
  139. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_faemd2d.py +0 -0
  140. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tests/test_faemd3d.py +0 -0
  141. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tsa/__init__.py +0 -0
  142. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tsa/_dtw.py +0 -0
  143. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tsa/_moving_decomp.py +0 -0
  144. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tsa/_mstl.py +0 -0
  145. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/tsa/_stl.py +0 -0
  146. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/__init__.py +0 -0
  147. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_cite.py +0 -0
  148. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_diagnalization.py +0 -0
  149. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_differ.py +0 -0
  150. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_fft.py +0 -0
  151. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_instantaneous.py +0 -0
  152. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_kernel_matrix.py +0 -0
  153. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_mirror.py +0 -0
  154. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_process.py +0 -0
  155. {pysdkit-0.4.24 → pysdkit-0.4.26}/pysdkit/utils/_smooth1d.py +0 -0
  156. {pysdkit-0.4.24 → pysdkit-0.4.26}/setup.cfg +0 -0
@@ -1,20 +1,47 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PySDKit
3
- Version: 0.4.24
3
+ Version: 0.4.26
4
4
  Summary: A Python library for signal decomposition algorithms with a unified interface.
5
- Home-page: https://github.com/wwhenxuan/PySDKit
6
- Author: whenxuan, changewam, josefinez, Yuan Feng, Wentong Zhao, JacktheFowler, Deeksha Manjunath
7
- Author-email: wwhenxuan@gmail.com
5
+ Author: josefinez, Deeksha Manjunath, Yuan Feng, JacktheFowler
6
+ Author-email: Whenxuan Wang <wwhenxuan@gmail.com>, RuiZhe Wang <3133986068@qq.com>, WenTong Zhao <23049200290@stu.xidian.edu.cn>
7
+ Maintainer-email: Whenxuan Wang <wwhenxuan@gmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2019 Whenxuan Wang
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+
30
+ Project-URL: Homepage, https://github.com/wwhenxuan/PySDKit
31
+ Project-URL: Repository, https://github.com/wwhenxuan/PySDKit
32
+ Project-URL: Issues, https://github.com/wwhenxuan/PySDKit/issues
8
33
  Keywords: signal decomposition,signal processing,machine learning
9
34
  Classifier: Development Status :: 3 - Alpha
10
35
  Classifier: Intended Audience :: Science/Research
11
36
  Classifier: Topic :: Scientific/Engineering :: Mathematics
12
37
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
38
  Classifier: License :: OSI Approved :: MIT License
39
+ Classifier: Programming Language :: Python :: 3
14
40
  Classifier: Programming Language :: Python :: 3.8
15
41
  Classifier: Programming Language :: Python :: 3.9
16
42
  Classifier: Programming Language :: Python :: 3.10
17
43
  Classifier: Programming Language :: Python :: 3.11
44
+ Classifier: Programming Language :: Python :: 3.12
18
45
  Requires-Python: >=3.8
19
46
  Description-Content-Type: text/markdown
20
47
  License-File: LICENSE
@@ -23,17 +50,7 @@ Requires-Dist: scipy>=1.11.1
23
50
  Requires-Dist: matplotlib>=3.7.2
24
51
  Requires-Dist: tqdm>=4.66.5
25
52
  Requires-Dist: requests>=2.32.3
26
- Dynamic: author
27
- Dynamic: author-email
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
32
- Dynamic: keywords
33
53
  Dynamic: license-file
34
- Dynamic: requires-dist
35
- Dynamic: requires-python
36
- Dynamic: summary
37
54
 
38
55
  # PySDKit: signal decomposition in Python
39
56
 
@@ -1,20 +1,47 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PySDKit
3
- Version: 0.4.24
3
+ Version: 0.4.26
4
4
  Summary: A Python library for signal decomposition algorithms with a unified interface.
5
- Home-page: https://github.com/wwhenxuan/PySDKit
6
- Author: whenxuan, changewam, josefinez, Yuan Feng, Wentong Zhao, JacktheFowler, Deeksha Manjunath
7
- Author-email: wwhenxuan@gmail.com
5
+ Author: josefinez, Deeksha Manjunath, Yuan Feng, JacktheFowler
6
+ Author-email: Whenxuan Wang <wwhenxuan@gmail.com>, RuiZhe Wang <3133986068@qq.com>, WenTong Zhao <23049200290@stu.xidian.edu.cn>
7
+ Maintainer-email: Whenxuan Wang <wwhenxuan@gmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2019 Whenxuan Wang
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+
30
+ Project-URL: Homepage, https://github.com/wwhenxuan/PySDKit
31
+ Project-URL: Repository, https://github.com/wwhenxuan/PySDKit
32
+ Project-URL: Issues, https://github.com/wwhenxuan/PySDKit/issues
8
33
  Keywords: signal decomposition,signal processing,machine learning
9
34
  Classifier: Development Status :: 3 - Alpha
10
35
  Classifier: Intended Audience :: Science/Research
11
36
  Classifier: Topic :: Scientific/Engineering :: Mathematics
12
37
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
38
  Classifier: License :: OSI Approved :: MIT License
39
+ Classifier: Programming Language :: Python :: 3
14
40
  Classifier: Programming Language :: Python :: 3.8
15
41
  Classifier: Programming Language :: Python :: 3.9
16
42
  Classifier: Programming Language :: Python :: 3.10
17
43
  Classifier: Programming Language :: Python :: 3.11
44
+ Classifier: Programming Language :: Python :: 3.12
18
45
  Requires-Python: >=3.8
19
46
  Description-Content-Type: text/markdown
20
47
  License-File: LICENSE
@@ -23,17 +50,7 @@ Requires-Dist: scipy>=1.11.1
23
50
  Requires-Dist: matplotlib>=3.7.2
24
51
  Requires-Dist: tqdm>=4.66.5
25
52
  Requires-Dist: requests>=2.32.3
26
- Dynamic: author
27
- Dynamic: author-email
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
32
- Dynamic: keywords
33
53
  Dynamic: license-file
34
- Dynamic: requires-dist
35
- Dynamic: requires-python
36
- Dynamic: summary
37
54
 
38
55
  # PySDKit: signal decomposition in Python
39
56
 
@@ -1,6 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
- setup.py
3
+ pyproject.toml
4
4
  PySDKit.egg-info/PKG-INFO
5
5
  PySDKit.egg-info/SOURCES.txt
6
6
  PySDKit.egg-info/dependency_links.txt
@@ -96,13 +96,15 @@ pysdkit/plot/_plot_images.py
96
96
  pysdkit/plot/_plot_imfs.py
97
97
  pysdkit/plot/_plot_signal.py
98
98
  pysdkit/tests/__init__.py
99
- pysdkit/tests/test_all.py
99
+ pysdkit/tests/run_all.py
100
+ pysdkit/tests/test_avncmd.py
100
101
  pysdkit/tests/test_ceemdan.py
101
102
  pysdkit/tests/test_emd.py
102
103
  pysdkit/tests/test_ewt.py
103
104
  pysdkit/tests/test_faemd.py
104
105
  pysdkit/tests/test_faemd2d.py
105
106
  pysdkit/tests/test_faemd3d.py
107
+ pysdkit/tests/test_itd.py
106
108
  pysdkit/tests/test_lmd.py
107
109
  pysdkit/tests/test_moving_decomp.py
108
110
  pysdkit/tests/test_rlmd.py
@@ -0,0 +1,66 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "PySDKit"
7
+ dynamic = ["version"]
8
+ description = "A Python library for signal decomposition algorithms with a unified interface."
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ requires-python = ">=3.8"
12
+ authors = [
13
+ { name = "Whenxuan Wang", email = "wwhenxuan@gmail.com" },
14
+ { name = "RuiZhe Wang", email = "3133986068@qq.com" },
15
+ { name = "josefinez" },
16
+ { name = "Deeksha Manjunath" },
17
+ { name = "Yuan Feng" },
18
+ { name = "WenTong Zhao", email = "23049200290@stu.xidian.edu.cn" },
19
+ { name = "JacktheFowler" },
20
+ ]
21
+ maintainers = [
22
+ { name = "Whenxuan Wang", email = "wwhenxuan@gmail.com" },
23
+ ]
24
+ keywords = [
25
+ "signal decomposition",
26
+ "signal processing",
27
+ "machine learning",
28
+ ]
29
+ classifiers = [
30
+ "Development Status :: 3 - Alpha",
31
+ "Intended Audience :: Science/Research",
32
+ "Topic :: Scientific/Engineering :: Mathematics",
33
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
34
+ "License :: OSI Approved :: MIT License",
35
+ "Programming Language :: Python :: 3",
36
+ "Programming Language :: Python :: 3.8",
37
+ "Programming Language :: Python :: 3.9",
38
+ "Programming Language :: Python :: 3.10",
39
+ "Programming Language :: Python :: 3.11",
40
+ "Programming Language :: Python :: 3.12",
41
+ ]
42
+ dependencies = [
43
+ "numpy>=1.24.3",
44
+ "scipy>=1.11.1",
45
+ "matplotlib>=3.7.2",
46
+ "tqdm>=4.66.5",
47
+ "requests>=2.32.3",
48
+ ]
49
+
50
+ [project.urls]
51
+ Homepage = "https://github.com/wwhenxuan/PySDKit"
52
+ Repository = "https://github.com/wwhenxuan/PySDKit"
53
+ Issues = "https://github.com/wwhenxuan/PySDKit/issues"
54
+
55
+ [tool.setuptools.dynamic]
56
+ version = { attr = "pysdkit.__version__" }
57
+
58
+ [tool.setuptools]
59
+ include-package-data = true
60
+
61
+ [tool.setuptools.packages.find]
62
+ where = ["."]
63
+ include = ["pysdkit*"]
64
+
65
+ [tool.setuptools.package-data]
66
+ "*" = ["*.txt"]
@@ -2,7 +2,7 @@
2
2
  A Python library for signal decomposition algorithms.
3
3
  """
4
4
 
5
- __version__ = "0.4.24"
5
+ __version__ = "0.4.26"
6
6
 
7
7
  # Empirical Mode Decomposition
8
8
  from ._emd import EMD
@@ -70,6 +70,9 @@ from ._vncmd import VNCMD
70
70
  # Iterative Nonlinear Chirp Mode Decomposition
71
71
  from ._vncmd import INCMD
72
72
 
73
+ # Adaptive Variational Nonlinear Chirp Mode Decomposition
74
+ from ._vncmd import AVNCMD
75
+
73
76
  # Empirical Wavelet Transform
74
77
  from ._ewt import ewt, EWT
75
78
 
@@ -91,7 +94,7 @@ from ._emd import HHT
91
94
 
92
95
  def greet():
93
96
  print(
94
- """
97
+ r"""
95
98
  ____ ____ ____ _ __ _ _
96
99
  | _ \ _ _ / ___| | _ \ | |/ /(_)| |_
97
100
  | |_) || | | |\___ \ | | | || ' / | || __|
@@ -168,6 +171,7 @@ __all__ = [
168
171
  "CVMD2D",
169
172
  "VNCMD",
170
173
  "INCMD",
174
+ "AVNCMD",
171
175
  "ewt",
172
176
  "EWT",
173
177
  "JMD",
@@ -9,7 +9,7 @@ Code taken from https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/EMD.py
9
9
  import numpy as np
10
10
  from numpy import ndarray
11
11
  from scipy.interpolate import interp1d
12
- from typing import Optional, Tuple, Union
12
+ from typing import Optional, Tuple, Union, List
13
13
 
14
14
  from pysdkit._emd import akima, cubic, pchip, cubic_hermite, cubic_spline_3pts
15
15
  from pysdkit._emd import find_extrema_parabol, find_extrema_simple
@@ -231,7 +231,7 @@ class EMD(object):
231
231
 
232
232
  def extract_max_min_spline(
233
233
  self, time: np.ndarray, signal: np.ndarray
234
- ) -> Union[list[int], tuple[ndarray, ndarray, ndarray, ndarray]]:
234
+ ) -> Union[List[int], Tuple[ndarray, ndarray, ndarray, ndarray]]:
235
235
  """
236
236
  Extracts top and bottom envelopes based on the signal,
237
237
  which are constructed based on maxima and minima, respectively.
@@ -7,7 +7,7 @@ Created on 2025/02/06 10:29:05
7
7
  import numpy as np
8
8
  from matplotlib import pyplot as plt
9
9
 
10
- from typing import Optional, Tuple, Any, Union
10
+ from typing import Optional, Tuple, Any, Union, List
11
11
 
12
12
  from pysdkit.plot import plot_IMFs, plot_HilbertSpectrum
13
13
  from pysdkit.utils import (
@@ -164,7 +164,7 @@ class HHT(object):
164
164
  imfs_env: Optional[np.ndarray] = None,
165
165
  imfs_freq: Optional[np.ndarray] = None,
166
166
  fs: Optional[float] = None,
167
- freq_lim: Optional[tuple[float, float]] = None,
167
+ freq_lim: Optional[Tuple[float, float]] = None,
168
168
  freq_res: Optional[float] = None,
169
169
  time_scale: int = 1,
170
170
  ) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
@@ -204,10 +204,10 @@ class HHT(object):
204
204
  imfs_env: Optional[np.ndarray] = None,
205
205
  imfs_freq: Optional[np.ndarray] = None,
206
206
  fs: Optional[float] = None,
207
- freq_lim: Optional[tuple[float, float]] = None,
207
+ freq_lim: Optional[Tuple[float, float]] = None,
208
208
  freq_res: Optional[float] = None,
209
209
  time_scale: int = 1,
210
- ) -> Union[tuple[Union[list[Any], Any], list[Any]], list[Any], Any]:
210
+ ) -> Union[Tuple[Union[List[Any], Any], List[Any]], List[Any], Any]:
211
211
  """
212
212
  Obtaining and visualizing the Hilbert spectrum.
213
213
 
@@ -154,7 +154,7 @@ class FAEMD(object):
154
154
  L = len(signal)
155
155
 
156
156
  # Ensure that the processed signal is always a column vector
157
- signal = np.reshape(signal, newshape=[L, 1])
157
+ signal = np.reshape(signal, [L, 1])
158
158
 
159
159
  r = int((window_size - 1) / 2)
160
160
 
@@ -186,7 +186,7 @@ class FAEMD(object):
186
186
  f_signal = y[r:-r]
187
187
 
188
188
  # Restoring Signal size
189
- f_signal = np.reshape(f_signal, newshape=shape)
189
+ f_signal = np.reshape(f_signal, shape)
190
190
 
191
191
  return f_signal
192
192
 
@@ -0,0 +1,189 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Created on 2025/01/12 12:24:54
4
+ @author: Whenxuan Wang
5
+ @email: wwhenxuan@gmail.com
6
+ """
7
+ import numpy as np
8
+
9
+ from scipy.signal import find_peaks
10
+ from scipy.interpolate import interp1d
11
+
12
+
13
+ class ITD(object):
14
+ """
15
+ ITD: Intrinsic Time-Scale Decomposition
16
+
17
+ H=_itd(x); returns the returns proper rotation components(PRC) and residual signal corresponding to the ITD of X
18
+ Frei, M. G., & Osorio, I. (2007, February).
19
+ Intrinsic time-scale decomposition: time-frequency-energy analysis and real-time filtering of non-stationary signals.
20
+ In Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences
21
+ (Vol. 463, No. 2078, pp. 321-342). The Royal Society.
22
+ MATLAB Link: https://www.mathworks.com/matlabcentral/fileexchange/69380-intrinsic-time-scale-decomposition-itd
23
+ """
24
+
25
+ def __init__(self, N_max: int = 10):
26
+ self.N_max = N_max
27
+
28
+ def __call__(self, signal: np.ndarray) -> np.ndarray:
29
+ """allow instances to be called like functions"""
30
+ return self.fit_transform(signal=signal)
31
+
32
+ def __str__(self) -> str:
33
+ """Get the full name and abbreviation of the algorithm"""
34
+ return "Intrinsic Time-Scale Decomposition (ITD)"
35
+
36
+ def stop_iter(self, x, counter, E_x):
37
+ """Determine whether the ITD iteration should stop.
38
+
39
+ :param x: current residual signal
40
+ :param counter: number of iterations completed
41
+ :param E_x: energy of the original input signal
42
+ :return: True if decomposition should stop
43
+ """
44
+ if counter > self.N_max:
45
+ return True
46
+
47
+ Exx = np.sum(x**2)
48
+ if Exx <= 0.01 * E_x:
49
+ return True
50
+
51
+ pks1, _ = find_peaks(x)
52
+ pks2, _ = find_peaks(-x)
53
+ pks = np.union1d(pks1, pks2)
54
+
55
+ if len(pks) <= 7:
56
+ return True
57
+
58
+ return False
59
+
60
+ @staticmethod
61
+ def itd_baseline_extract(x):
62
+ """
63
+ Calculate the baseline L of the signal x using the ITD algorithm.
64
+
65
+ The baseline is constructed by computing control points (LK) at each
66
+ extremum as a weighted average (alpha=0.5) of the signal value and the
67
+ interpolated opposite envelope, then piecewise-linearly interpolating
68
+ between consecutive extrema using signal-value-based slopes.
69
+
70
+ :param x: input 1D signal array
71
+ :return: tuple (L, H) where L is the baseline and H = x - L is the
72
+ proper rotation component
73
+ """
74
+ length = len(x)
75
+ t = np.arange(length)
76
+ alpha = 0.5
77
+
78
+ idx_max, _ = find_peaks(x)
79
+ val_max = x[idx_max]
80
+
81
+ idx_min, _ = find_peaks(-x)
82
+ val_min = x[idx_min]
83
+
84
+ if len(idx_max) == 0 or len(idx_min) == 0:
85
+ return x.copy(), np.zeros_like(x)
86
+
87
+ idx_cb = np.union1d(idx_max, idx_min)
88
+
89
+ # Pad boundary so that idx_max and idx_min span the same index range.
90
+ # When the first (or last) extremum on one side has no counterpart,
91
+ # mirror the opposite extremum's position with the signal value there.
92
+ if idx_max[0] < idx_min[0]:
93
+ idx_min = np.concatenate(([idx_max[0]], idx_min))
94
+ val_min = np.concatenate(([x[idx_max[0]]], val_min))
95
+ elif idx_min[0] < idx_max[0]:
96
+ idx_max = np.concatenate(([idx_min[0]], idx_max))
97
+ val_max = np.concatenate(([x[idx_min[0]]], val_max))
98
+
99
+ if idx_max[-1] > idx_min[-1]:
100
+ idx_min = np.concatenate((idx_min, [idx_max[-1]]))
101
+ val_min = np.concatenate((val_min, [x[idx_max[-1]]]))
102
+ elif idx_min[-1] > idx_max[-1]:
103
+ idx_max = np.concatenate((idx_max, [idx_min[-1]]))
104
+ val_max = np.concatenate((val_max, [x[idx_min[-1]]]))
105
+
106
+ Max_line_interp = interp1d(
107
+ idx_max, val_max, kind="linear", fill_value="extrapolate"
108
+ )
109
+ Min_line_interp = interp1d(
110
+ idx_min, val_min, kind="linear", fill_value="extrapolate"
111
+ )
112
+
113
+ Max_line = Max_line_interp(t)
114
+ Min_line = Min_line_interp(t)
115
+
116
+ # LK control points: weighted average at each extremum
117
+ LK1_vals = alpha * Max_line[idx_min] + (1 - alpha) * val_min
118
+ LK2_vals = alpha * Min_line[idx_max] + (1 - alpha) * val_max
119
+
120
+ # Build (position, value) pairs and merge
121
+ LK1_pts = np.column_stack((idx_min, LK1_vals))
122
+ LK2_pts = np.column_stack((idx_max, LK2_vals))
123
+ LK = np.vstack((LK1_pts, LK2_pts))
124
+
125
+ # Sort by position and remove duplicates at the boundaries
126
+ order = np.argsort(LK[:, 0])
127
+ LK = LK[order]
128
+
129
+ # Remove the padded boundary duplicates (first and last are mirrors)
130
+ if len(LK) > 2:
131
+ LK = LK[1:-1]
132
+
133
+ # Clamp to signal boundaries
134
+ LK = np.vstack(
135
+ (
136
+ [0, LK[0, 1]],
137
+ LK,
138
+ [length - 1, LK[-1, 1]],
139
+ )
140
+ )
141
+
142
+ # Compute baseline by piecewise-linear interpolation between extrema
143
+ idx_Xk = np.concatenate(([0], idx_cb, [length - 1])).astype(int)
144
+
145
+ L = np.zeros(length)
146
+ for i in range(len(idx_Xk) - 1):
147
+ denom = x[idx_Xk[i + 1]] - x[idx_Xk[i]]
148
+ kij = (LK[i + 1, 1] - LK[i, 1]) / denom if denom != 0 else 0.0
149
+ for j in range(idx_Xk[i], idx_Xk[i + 1]):
150
+ L[j] = LK[i, 1] + kij * (x[j] - x[idx_Xk[i]])
151
+
152
+ L[length - 1] = LK[-1, 1]
153
+
154
+ H = x - L
155
+ return L, H
156
+
157
+ def fit_transform(self, signal: np.ndarray) -> np.ndarray:
158
+ """Input x is a 1D numpy signal and return the decomposition results."""
159
+ H = []
160
+ E_x = np.sum(signal**2)
161
+ counter = 0
162
+
163
+ while True:
164
+ counter = counter + 1
165
+ L1, H1 = self.itd_baseline_extract(signal)
166
+ H.append(H1)
167
+ STOP = self.stop_iter(signal, counter, E_x)
168
+ if STOP is True:
169
+ H.append(L1)
170
+ break
171
+ signal = L1
172
+
173
+ H = np.vstack(H)
174
+
175
+ return H
176
+
177
+
178
+ if __name__ == "__main__":
179
+ from pysdkit.data import test_univariate_signal
180
+ from pysdkit.plot import plot_IMFs
181
+
182
+ time, signal = test_univariate_signal()
183
+
184
+ print(signal.shape)
185
+
186
+ itd = ITD()
187
+ imfs = itd.fit_transform(signal=signal)
188
+
189
+ plot_IMFs(signal, IMFs=imfs)
@@ -7,3 +7,5 @@ Created on Sat Mar 8 21:45:02 2024
7
7
  from .vncmd import VNCMD
8
8
 
9
9
  from .incmd import INCMD
10
+
11
+ from .avncmd import AVNCMD