fABBA 1.2.2__tar.gz → 1.2.4__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 (58) hide show
  1. {fABBA-1.2.2 → fABBA-1.2.4}/PKG-INFO +1 -1
  2. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/__init__.py +1 -1
  3. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/fabba_agg_cm_win.pyx +4 -2
  4. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/jabba.py +25 -1
  5. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA.egg-info/PKG-INFO +1 -1
  6. {fABBA-1.2.2 → fABBA-1.2.4}/setup.py +1 -1
  7. {fABBA-1.2.2 → fABBA-1.2.4}/LICENSE +0 -0
  8. {fABBA-1.2.2 → fABBA-1.2.4}/README.rst +0 -0
  9. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/chainApproximation.py +0 -0
  10. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/digitization.py +0 -0
  11. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/__init__.py +0 -0
  12. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/chainApproximation_c.pyx +0 -0
  13. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/chainApproximation_cm.pyx +0 -0
  14. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/fabba_agg_c.pyx +0 -0
  15. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/fabba_agg_cm.pyx +0 -0
  16. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/extmod/inverse_tc.pyx +0 -0
  17. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/fabba.py +0 -0
  18. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/fabba_agg.py +0 -0
  19. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/inverse_t.py +0 -0
  20. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/__init__.py +0 -0
  21. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/agg.py +0 -0
  22. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/aggmem.pyx +0 -0
  23. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/aggwin.pyx +0 -0
  24. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/comp.py +0 -0
  25. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/compmem.pyx +0 -0
  26. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/AtrialFibrillation_TEST.arff +0 -0
  27. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/AtrialFibrillation_TRAIN.arff +0 -0
  28. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/BasicMotions_TEST.arff +0 -0
  29. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/BasicMotions_TRAIN.arff +0 -0
  30. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/CharacterTrajectories_TEST.arff +0 -0
  31. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/CharacterTrajectories_TRAIN.arff +0 -0
  32. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/Epilepsy_TEST.arff +0 -0
  33. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/Epilepsy_TRAIN.arff +0 -0
  34. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/JapaneseVowels_TEST.arff +0 -0
  35. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/JapaneseVowels_TRAIN.arff +0 -0
  36. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/LSST_TEST.arff +0 -0
  37. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/LSST_TRAIN.arff +0 -0
  38. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/NATOPS_TEST.arff +0 -0
  39. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/NATOPS_TRAIN.arff +0 -0
  40. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/UWaveGestureLibrary_TEST.arff +0 -0
  41. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/UWaveGestureLibrary_TRAIN.arff +0 -0
  42. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/beef_test.npy +0 -0
  43. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/data/beef_train.npy +0 -0
  44. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/fkmns.py +0 -0
  45. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/inverset.py +0 -0
  46. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/inversetc.pyx +0 -0
  47. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/jabba/preprocessing.py +0 -0
  48. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/load_datasets.py +0 -0
  49. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/separate/__init__.py +0 -0
  50. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/separate/aggregation.py +0 -0
  51. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/separate/aggregation_c.pyx +0 -0
  52. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA/separate/aggregation_cm.pyx +0 -0
  53. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA.egg-info/SOURCES.txt +0 -0
  54. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA.egg-info/dependency_links.txt +0 -0
  55. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA.egg-info/requires.txt +0 -0
  56. {fABBA-1.2.2 → fABBA-1.2.4}/fABBA.egg-info/top_level.txt +0 -0
  57. {fABBA-1.2.2 → fABBA-1.2.4}/pyproject.toml +0 -0
  58. {fABBA-1.2.2 → fABBA-1.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fABBA
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: An efficient aggregation method for the symbolic representation of temporal data
5
5
  Home-page: https://github.com/nla-group/fABBA
6
6
  Author: Xinye Chen, Stefan Güttel
@@ -10,7 +10,7 @@ except (ModuleNotFoundError, ValueError):
10
10
  from .separate.aggregation import aggregate
11
11
 
12
12
 
13
- __version__ = '1.2.2'
13
+ __version__ = '1.2.4'
14
14
  from .load_datasets import load_images, loadData
15
15
  from .fabba import (image_compress, image_decompress, ABBAbase, ABBA,
16
16
  get_patches, patched_reconstruction, fABBA,
@@ -63,7 +63,9 @@ cpdef aggregate(double[:,:] data, str sorting, double tol=0.5):
63
63
  cdef unsigned int lab=0, num_group # , nr_dist=0
64
64
  cdef double[:] clustc # starting point coordinates
65
65
  cdef double dist
66
- cdef long long[:] labels = np.full(len_ind, -1, dtype=int)
66
+
67
+ cdef np.ndarray[int, ndim=1] labels = np.full(len_ind, -1, dtype=int)
68
+
67
69
  cdef list splist = list() # list of starting points
68
70
  cdef Py_ssize_t i, ii, j
69
71
 
@@ -117,5 +119,5 @@ cpdef aggregate(double[:,:] data, str sorting, double tol=0.5):
117
119
 
118
120
  lab += 1
119
121
 
120
- return np.asarray(labels), splist # , nr_dist
122
+ return labels, splist # , nr_dist
121
123
 
@@ -517,8 +517,23 @@ class JABBA(object):
517
517
  if series.dtype != 'float64':
518
518
  series = series.astype('float64')
519
519
 
520
+ if isinstance(series, np.ndarray):
521
+ if len(series.shape) == 1:
522
+ uni_dim = True
523
+ else:
524
+ uni_dim = False
525
+
526
+ elif isinstance(series, list):
527
+ if not isinstance(series[0], list):
528
+ uni_dim = True
529
+ else:
530
+ uni_dim = False
531
+ else:
532
+ raise ValueError('Please enter time series with correct shape.')
533
+
520
534
  n_jobs = self.n_jobs_init(n_jobs)
521
- if len(series.shape) == 1:
535
+
536
+ if uni_dim:
522
537
  # Partition time series for parallelism (for n_jobs > 1 or = -1) if it is univarite
523
538
  self.return_series_univariate = True # means the series is univariate,
524
539
  # so the reconstruction can automatically
@@ -530,6 +545,15 @@ class JABBA(object):
530
545
  else:
531
546
  self.return_series_univariate = False
532
547
 
548
+ if self.recap_shape is not None:
549
+ if not isinstance(series, np.ndarray):
550
+ series = np.asarray(series)
551
+
552
+ if series.shape != self.recap_shape:
553
+ raise ValueError('Please enter the input with consistent dimensions.')
554
+
555
+ series = series.reshape(-1, int(np.prod(self.recap_shape[1:])))
556
+
533
557
  string_sequences = list()
534
558
  start_set = list()
535
559
  if n_jobs != 1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fABBA
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: An efficient aggregation method for the symbolic representation of temporal data
5
5
  Home-page: https://github.com/nla-group/fABBA
6
6
  Author: Xinye Chen, Stefan Güttel
@@ -26,7 +26,7 @@ class CustomBuildExtCommand(build_ext):
26
26
 
27
27
  setup_args = {'name':"fABBA",
28
28
  'packages':setuptools.find_packages(),
29
- 'version':"1.2.2",
29
+ 'version':"1.2.4",
30
30
  'cmdclass': {'build_ext': CustomBuildExtCommand},
31
31
  'install_requires':["numpy>=1.3.0", "scipy>=0.7.0",
32
32
  "requests", "pandas",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes