Skip to content
Snippets Groups Projects
Commit 6aacbd75 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

Merge branch 'switchTofastDtw' into 'develop'

switched to fast dtw

See merge request !844
parents 0fe2b0a5 4a682a96
No related branches found
No related tags found
1 merge request!844switched to fast dtw
Pipeline #206443 passed with stages
in 7 minutes and 33 seconds
......@@ -21,6 +21,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
- `flagUniLOF`: added defaultly applied correction to mitigate phenomenon of overflagging at relatively steep data value slopes. (parameter `slope_correct`).
- `History`: added option to change aggregation behavior
### Changed
- `flagPattern` uses *fastdtw* package now to compute timeseries distances
### Removed
### Fixed
- `flagConstants`: fixed flagging of rolling ramps
......
......@@ -4,7 +4,7 @@
Click==8.1.7
docstring_parser==0.16
dtw==1.4.0
fastdtw==0.3.4
matplotlib==3.8.3
numpy==1.26.4
outlier-utils==0.0.5
......
......@@ -6,7 +6,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import dtw
import fastdtw
import pandas as pd
from saqc import BAD
......@@ -71,9 +71,9 @@ def calculateDistanceByDTW(
def isPattern(chunk):
if forward:
return dtw.accelerated_dtw(chunk[::-1], reference, "euclidean")[0]
return fastdtw.fastdtw(chunk[::-1], reference)[0]
else:
return dtw.accelerated_dtw(chunk, reference, "euclidean")[0]
return fastdtw.fastdtw(chunk, reference)[0]
# generate distances, excluding NaNs
nonas = data.dropna()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment