Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Troubled Cell Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
1631565e
Commit
1631565e
authored
Sep 5, 2022
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Added option to overlap folds for Boxplot method.
parent
87e13049
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Troubled_Cell_Detector.py
+11
-5
11 additions, 5 deletions
Troubled_Cell_Detector.py
with
11 additions
and
5 deletions
Troubled_Cell_Detector.py
+
11
−
5
View file @
1631565e
...
...
@@ -4,12 +4,12 @@
TODO: Introduce Adjusted Outer Fence method in Boxplot using global_mean
-> Done
TODO: Introduce overlapping cell for adjacent folds in Boxplot
TODO: Introduce overlapping cells for adjacent folds in Boxplot -> Done
TODO: Extract fold computing from TC checking
TODO: Introduce lower/upper extreme outliers in Boxplot
(each cell is also checked for neighboring domains if existing)
TODO: Determine max_value for Theoretical only over highest degree
TODO: Check if indexing in wavelets is correct
TODO: Extract fold computing from TC checking
TODO: Add ThresholdDetector
TODO: Add TC condition to only flag cell if left-adjacent one is flagged as
well (remove this condition)
...
...
@@ -342,6 +342,8 @@ class Boxplot(WaveletDetector):
Length of Boxplot whiskers.
adjust_outer_fences : bool
Flag whether outer fences should be adjusted using global mean.
num_overlapping_cells : int
Number of cells overlapping with adjacent folds.
"""
def
_reset
(
self
,
config
):
...
...
@@ -359,6 +361,7 @@ class Boxplot(WaveletDetector):
self
.
_fold_len
=
config
.
pop
(
'
fold_len
'
,
16
)
self
.
_whisker_len
=
config
.
pop
(
'
whisker_len
'
,
3
)
self
.
_adjust_outer_fences
=
config
.
pop
(
'
adjust_outer_fences
'
,
True
)
self
.
_num_overlapping_cells
=
config
.
pop
(
'
num_overlapping_cells
'
,
1
)
def
_get_cells
(
self
,
multiwavelet_coeffs
,
projection
):
"""
Calculates troubled cells using multiwavelet coefficients.
...
...
@@ -392,8 +395,11 @@ class Boxplot(WaveletDetector):
troubled_cells
=
[]
for
fold
in
range
(
num_folds
):
sorted_fold
=
sorted
(
indexed_coeffs
[
fold
*
self
.
_fold_len
:
(
fold
+
1
)
*
self
.
_fold_len
])
indices
=
np
.
array
([
i
%
len
(
indexed_coeffs
)
for
i
in
range
(
fold
*
self
.
_fold_len
-
self
.
_num_overlapping_cells
,
(
fold
+
1
)
*
self
.
_fold_len
+
self
.
_num_overlapping_cells
)])
sorted_fold
=
sorted
(
np
.
array
(
indexed_coeffs
)[
indices
],
key
=
lambda
x
:
x
[
0
])
boundary_index
=
self
.
_fold_len
//
4
balance_factor
=
self
.
_fold_len
/
4.0
-
boundary_index
...
...
@@ -422,7 +428,7 @@ class Boxplot(WaveletDetector):
else
:
break
# Check for
low
er extreme outliers and add respective cells
# Check for
upp
er extreme outliers and add respective cells
for
cell
in
sorted_fold
[::
-
1
][:]:
if
cell
[
0
]
>
upper_bound
:
troubled_cells
.
append
(
cell
[
1
])
...
...
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