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
7
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
6c5a9425
Commit
6c5a9425
authored
4 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
test for grubbs test implemented
parent
206cefc9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!193
Release 1.4
,
!188
Release 1.4
,
!49
Dataprocessing features
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/funcs/test_data_modelling.py
+1
-4
1 addition, 4 deletions
test/funcs/test_data_modelling.py
test/funcs/test_spikes_detection.py
+10
-1
10 additions, 1 deletion
test/funcs/test_spikes_detection.py
with
11 additions
and
5 deletions
test/funcs/test_data_modelling.py
+
1
−
4
View file @
6c5a9425
...
...
@@ -4,18 +4,15 @@
import
pytest
import
numpy
as
np
import
pandas
as
pd
from
dios
import
dios
from
test.common
import
TESTFLAGGER
import
matplotlib.pyplot
as
plt
from
saqc.funcs.data_modelling
import
(
modelling_polyFit
)
import
numpy.polynomial.polynomial
as
poly
TF
=
TESTFLAGGER
[:
1
]
TF
=
TESTFLAGGER
[:
1
]
@pytest.mark.parametrize
(
"
flagger
"
,
TF
)
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_2
"
)])
def
test_modelling_polyFit_forRegular
(
dat
,
flagger
):
...
...
This diff is collapsed.
Click to expand it.
test/funcs/test_spikes_detection.py
+
10
−
1
View file @
6c5a9425
...
...
@@ -12,7 +12,8 @@ from saqc.funcs.spikes_detection import (
spikes_flagSlidingZscore
,
spikes_flagBasic
,
spikes_flagRaise
,
spikes_flagMultivarScores
spikes_flagMultivarScores
,
spikes_flagGrubbs
)
from
test.common
import
TESTFLAGGER
...
...
@@ -120,3 +121,11 @@ def test_flagMultivarScores(dat, flagger):
assert
isflagged
[
characteristics
[
'
raise
'
]].
all
()
assert
not
isflagged
[
characteristics
[
'
return
'
]].
any
()
assert
not
isflagged
[
characteristics
[
'
drop
'
]].
any
()
@pytest.mark.parametrize
(
"
flagger
"
,
TESTFLAGGER
)
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_3
"
)])
def
test_grubbs
(
dat
,
flagger
):
data
,
char_dict
=
dat
(
freq
=
'
10min
'
,
periods
=
45
,
initial_level
=
0
,
final_level
=
0
,
crowd_size
=
1
,
crowd_spacing
=
3
,
out_val
=-
10
)
flagger
=
flagger
.
initFlags
(
data
)
data
,
result_flagger
=
spikes_flagGrubbs
(
data
,
'
data
'
,
flagger
,
winsz
=
20
,
min_periods
=
15
)
assert
result_flagger
.
isFlagged
(
'
data
'
)[
char_dict
[
"
drop
"
]].
all
()
\ No newline at end of file
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