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

corrected / detailed in-code doku of anomaly fixtures (realized to forget them briefly)

parent 21cd7ebe
No related branches found
No related tags found
2 merge requests!21Gcef testfuncs,!20Gcef testfuncs
......@@ -12,6 +12,7 @@ def char_dict():
@pytest.fixture
def course_1(char_dict):
# MONOTONOUSLY ASCENDING/DESCENDING
# values , that monotonously ascend towards a peak level, and thereafter do monotonously decrease
# the resulting drop/raise per value equals: (peak_level - initial_level) / (0.5*(periods-2))
# periods number better be even!
......@@ -32,6 +33,7 @@ def course_1(char_dict):
@pytest.fixture
def course_2(char_dict):
# SINGLE_SPIKE
# values , that linearly develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
# one "anomalous" or "outlierish" value of magnitude "out_val" at position "periods/2"
# number of periods better be even!
......@@ -59,9 +61,13 @@ def course_2(char_dict):
@pytest.fixture
def course_3(char_dict):
# CROWD IN A PIT/CROWD ON A SUMMIT
# values , that linearly develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
# one "anomalous" or "outlierish" value of magnitude "out_val" at position "periods/2"
# a "crowd" of "anomalous" or "outlierish" values of magnitude "out_val".
# The "crowd/group" of anomalous values starts at position "periods/2" and continues with an additional amount
# of "crowd_size" values, that are each spaced "crowd_spacing" minutes from there predecessors.
# number of periods better be even!
# chrowd_size * crowd_spacing better be less then freq[minutes].
def fix_funk(freq='10min', periods=10, initial_level=0, final_level=2, out_val=-5,
initial_index=pd.Timestamp(2000, 1, 1, 0, 0, 0), char_dict=char_dict, crowd_size=5, crowd_spacing=1):
......@@ -87,8 +93,9 @@ def course_3(char_dict):
@pytest.fixture
def course_4(char_dict):
# values , that linearly develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
# one "anomalous" or "outlierish" value of magnitude "out_val" at position "periods/2"
# TEETH (ROW OF SPIKES)
# values , that remain on value level "base_level" and than begin exposing an outlierish or spikey value of magnitude
# "out_val" every second timestep, starting at periods/2, with the first spike.
# number of periods better be even!
def fix_funk(freq='10min', periods=10, base_level=0, out_val=5,
initial_index=pd.Timestamp(2000, 1, 1, 0, 0, 0), char_dict=char_dict):
......
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