pytrendy 1.2.0.dev2__tar.gz → 1.2.0.dev4__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.
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/PKG-INFO +1 -1
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pyproject.toml +1 -1
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/abrupt_shaving.py +1 -1
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/trend_classify.py +5 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/LICENSE +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/README.md +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/__init__.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/detect_trends.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/__init__.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/data/classes_signals.csv +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/data/series_synthetic.csv +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/data_loader.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/plot_pytrendy.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/io/results_pytrendy.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/__init__.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_analyse.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_get.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/__init__.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/artifact_cleanup.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/gradual_expand_contract.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/segment_grouping.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/update_neighbours.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/process_signals.py +0 -0
- {pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/simpledtw.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytrendy"
|
|
3
|
-
version = "1.2.0.
|
|
3
|
+
version = "1.2.0.dev4"
|
|
4
4
|
description = "Trend Detection in Python. Applicable for real-world industry use cases in time series."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Russell Sammut Bonnici", email = "r.sammutbonnici@gmail.com" },
|
|
@@ -123,7 +123,7 @@ def shave_abrupt_trends(df: pd.DataFrame, value_col: str, segments: list[dict],
|
|
|
123
123
|
|
|
124
124
|
# Second pass to pad segments if specified
|
|
125
125
|
segments_padded = deepcopy(segments_refined)
|
|
126
|
-
if method_params.get('abrupt_padding', 0)
|
|
126
|
+
if method_params.get('abrupt_padding', 0) > 0:
|
|
127
127
|
|
|
128
128
|
meta_df = pd.DataFrame(segments_refined) # metadata df, to filter by datetime easily
|
|
129
129
|
meta_df['start'] = pd.to_datetime(meta_df['start'])
|
|
@@ -36,6 +36,11 @@ def classify_trends(df: pd.DataFrame, value_col: str, segments: list[dict]) -> l
|
|
|
36
36
|
if segment['direction'] not in ['Up', 'Down']:
|
|
37
37
|
continue
|
|
38
38
|
|
|
39
|
+
# Skip reclassification for padded segments — their length is artificially inflated
|
|
40
|
+
# by abrupt_padding, so DTW would wrongly classify them as gradual
|
|
41
|
+
if segment.get('padded', False):
|
|
42
|
+
continue
|
|
43
|
+
|
|
39
44
|
# Assume some padding for abrupt cases
|
|
40
45
|
start = pd.to_datetime(segment['start']) - pd.Timedelta(days=2)
|
|
41
46
|
end = pd.to_datetime(segment['end']) + pd.Timedelta(days=2)
|
|
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
|
{pytrendy-1.2.0.dev2 → pytrendy-1.2.0.dev4}/pytrendy/post_processing/segments_refine/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|