Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rdm-software
SaQC
Commits
d1ed3906
Commit
d1ed3906
authored
5 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
corrected / detailed in-code doku of anomaly fixtures (realized to forget them briefly)
parent
21cd7ebe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!21
Gcef testfuncs
,
!20
Gcef testfuncs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/funcs/conftest.py
+10
-3
10 additions, 3 deletions
test/funcs/conftest.py
with
10 additions
and
3 deletions
test/funcs/conftest.py
+
10
−
3
View file @
d1ed3906
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment