pattern-detector 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl
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.
- pattern_detector/__init__.py +1 -1
- pattern_detector-0.2.2.dist-info/METADATA +41 -0
- pattern_detector-0.2.2.dist-info/RECORD +12 -0
- {pattern_detector-0.2.0.dist-info → pattern_detector-0.2.2.dist-info}/WHEEL +1 -1
- tests/test_detector.py +4 -4
- pattern_detector-0.2.0.dist-info/METADATA +0 -17
- pattern_detector-0.2.0.dist-info/RECORD +0 -12
- {pattern_detector-0.2.0.dist-info → pattern_detector-0.2.2.dist-info}/LICENSE +0 -0
- {pattern_detector-0.2.0.dist-info → pattern_detector-0.2.2.dist-info}/top_level.txt +0 -0
pattern_detector/__init__.py
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: pattern_detector
|
3
|
+
Version: 0.2.2
|
4
|
+
Summary: A library for detecting patterns in time-series data.
|
5
|
+
Author: Yigit Utku Bulut and Ahmet Faruk Minareci
|
6
|
+
Author-email: yigit.utku.bulut@gmail.com, ahmetfaruk.minareci@gmail.com
|
7
|
+
License: MIT
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Requires-Python: >=3.7
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
License-File: LICENSE
|
14
|
+
Requires-Dist: numpy
|
15
|
+
Requires-Dist: pandas
|
16
|
+
Requires-Dist: joblib
|
17
|
+
Requires-Dist: scipy
|
18
|
+
Dynamic: author
|
19
|
+
Dynamic: author-email
|
20
|
+
Dynamic: classifier
|
21
|
+
Dynamic: description
|
22
|
+
Dynamic: description-content-type
|
23
|
+
Dynamic: license
|
24
|
+
Dynamic: requires-dist
|
25
|
+
Dynamic: requires-python
|
26
|
+
Dynamic: summary
|
27
|
+
|
28
|
+
## Pattern Detector
|
29
|
+
pattern_detector is a Python library for detecting patterns in 1-D time-series data using advanced sliding window and similarity computations.
|
30
|
+
|
31
|
+
## Suggestion of use
|
32
|
+
Pattern selection is a crucial step for pattern detection algorithms. Try to select stationary start and end points in your signal for sample pattern.
|
33
|
+
|
34
|
+
## Installation
|
35
|
+
pip install pattern_detector
|
36
|
+
|
37
|
+
## Example Usage
|
38
|
+
|
39
|
+
import pattern_detector
|
40
|
+
|
41
|
+
df = pattern_detector(df, pattern, "column_name_of_pattern")
|
@@ -0,0 +1,12 @@
|
|
1
|
+
pattern_detector/__init__.py,sha256=Z3w7vL_RJ7ddcRCtgk-aBO1mvo84oh0eReesC3INba4,1159
|
2
|
+
pattern_detector/aoi_finder.py,sha256=TwlXN54UWVdWl2tC-E48enCPiDvnkmFm_rwFhZkkS7c,7069
|
3
|
+
pattern_detector/cosine_similarity_function.py,sha256=Vgh6Blm6kji54JfXLVoiesYYwO0qDAyCv6W--YBlU3o,2704
|
4
|
+
pattern_detector/sliding_window_cosine_similarity.py,sha256=B-Zs0fHDCXlFcWlzEhKuTquavIWzUlMgc1dd3x2gkBk,1735
|
5
|
+
pattern_detector/utils.py,sha256=jqkfeTqWEnrnvzKBxr_UdKj9cj7zPF15UhHPr9sBSa0,2646
|
6
|
+
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
tests/test_detector.py,sha256=mSNuqaHEkRiGcFnvvwNWa1UWKjhF6l8xBrFhGHQ1S0A,1021
|
8
|
+
pattern_detector-0.2.2.dist-info/LICENSE,sha256=RslT26mCGxF9nQEyEQL8kFMFUgmYvCA0UivIWefxWmU,1098
|
9
|
+
pattern_detector-0.2.2.dist-info/METADATA,sha256=CH16GY-N_SK5uZAOeKy92g0C2LNdJj-egSLxOxZCwS0,1258
|
10
|
+
pattern_detector-0.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
11
|
+
pattern_detector-0.2.2.dist-info/top_level.txt,sha256=zYjRoeMq6DYEzeVTU-JZKbeooXspQwn8M0uCF-naRww,23
|
12
|
+
pattern_detector-0.2.2.dist-info/RECORD,,
|
tests/test_detector.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import pytest
|
2
2
|
import numpy as np
|
3
3
|
import pandas as pd
|
4
|
-
|
4
|
+
from pattern_detector.aoi_finder import run_area_of_interest_finder
|
5
5
|
|
6
6
|
def test_preprocess_pattern():
|
7
7
|
pattern = pd.DataFrame({"value": range(10)})
|
8
|
-
detector =
|
8
|
+
detector = run_area_of_interest_finder(None, pattern, "value")
|
9
9
|
detector.preprocess_pattern()
|
10
10
|
assert detector.pattern1 is not None
|
11
11
|
assert len(detector.pattern1) > 0
|
@@ -13,7 +13,7 @@ def test_preprocess_pattern():
|
|
13
13
|
def test_calculate_similarity():
|
14
14
|
data = pd.DataFrame({"value": range(100)})
|
15
15
|
pattern = pd.DataFrame({"value": range(10)})
|
16
|
-
detector =
|
16
|
+
detector = run_area_of_interest_finder(data, pattern, "value")
|
17
17
|
detector.preprocess_pattern()
|
18
18
|
detector.calculate_similarity()
|
19
19
|
assert len(detector.similarity_dict) > 0
|
@@ -21,7 +21,7 @@ def test_calculate_similarity():
|
|
21
21
|
def test_find_area_of_interest():
|
22
22
|
data = pd.DataFrame({"value": range(100)})
|
23
23
|
pattern = pd.DataFrame({"value": range(10)})
|
24
|
-
detector =
|
24
|
+
detector = run_area_of_interest_finder(data, pattern, "value")
|
25
25
|
result = detector.find_area_of_interest()
|
26
26
|
assert "cycle" in result.columns
|
27
27
|
assert not result["cycle"].isnull().all()
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: pattern_detector
|
3
|
-
Version: 0.2.0
|
4
|
-
Summary: A library for detecting patterns in time-series data.
|
5
|
-
Author: Yigit Utku Bulut and Ahmet Faruk Minareci
|
6
|
-
Author-email: yigit.utku.bulut@gmail.com, ahmetfaruk.minareci@gmail.com
|
7
|
-
License: MIT
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Operating System :: OS Independent
|
11
|
-
Requires-Python: >=3.7
|
12
|
-
License-File: LICENSE
|
13
|
-
Requires-Dist: numpy
|
14
|
-
Requires-Dist: pandas
|
15
|
-
Requires-Dist: joblib
|
16
|
-
Requires-Dist: scipy
|
17
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
pattern_detector/__init__.py,sha256=KdIGjRvrjByYpWexnCidgTpFpMcj0TJAqJXrh05VJTo,1159
|
2
|
-
pattern_detector/aoi_finder.py,sha256=TwlXN54UWVdWl2tC-E48enCPiDvnkmFm_rwFhZkkS7c,7069
|
3
|
-
pattern_detector/cosine_similarity_function.py,sha256=Vgh6Blm6kji54JfXLVoiesYYwO0qDAyCv6W--YBlU3o,2704
|
4
|
-
pattern_detector/sliding_window_cosine_similarity.py,sha256=B-Zs0fHDCXlFcWlzEhKuTquavIWzUlMgc1dd3x2gkBk,1735
|
5
|
-
pattern_detector/utils.py,sha256=jqkfeTqWEnrnvzKBxr_UdKj9cj7zPF15UhHPr9sBSa0,2646
|
6
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
tests/test_detector.py,sha256=nJJRWlXy1jGM3gbynHJGVD7jO4Zp0eqCuQYNePWtjJw,972
|
8
|
-
pattern_detector-0.2.0.dist-info/LICENSE,sha256=RslT26mCGxF9nQEyEQL8kFMFUgmYvCA0UivIWefxWmU,1098
|
9
|
-
pattern_detector-0.2.0.dist-info/METADATA,sha256=N8bkT1WbLmP0CspHdwXrLVYmUcKk8ZMt9C4EYeH9Gsk,536
|
10
|
-
pattern_detector-0.2.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
11
|
-
pattern_detector-0.2.0.dist-info/top_level.txt,sha256=zYjRoeMq6DYEzeVTU-JZKbeooXspQwn8M0uCF-naRww,23
|
12
|
-
pattern_detector-0.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|