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
55c61934
Commit
55c61934
authored
Aug 31, 2021
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Removed completed TODOs.
parent
5a76d2bb
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
ANN_Training.py
+10
-8
10 additions, 8 deletions
ANN_Training.py
DG_Approximation.py
+1
-1
1 addition, 1 deletion
DG_Approximation.py
Plotting.py
+0
-1
0 additions, 1 deletion
Plotting.py
Troubled_Cell_Detector.py
+3
-0
3 additions, 0 deletions
Troubled_Cell_Detector.py
with
14 additions
and
10 deletions
ANN_Training.py
+
10
−
8
View file @
55c61934
...
@@ -3,13 +3,14 @@
...
@@ -3,13 +3,14 @@
@author: Laura C. Kühle, Soraya Terrab (sorayaterrab)
@author: Laura C. Kühle, Soraya Terrab (sorayaterrab)
TODO: Improve
'
epoch_training()
'
TODO: Improve
'
epoch_training()
'
TODO: Add ANN testing from Soraya -> Done
TODO: Add ANN classification from Soraya
TODO: Add ANN classification from Soraya
TODO: Improve naming of training data/model (maybe different folders?)
TODO: Improve naming of training data/model (maybe different folders?; split training data leter;
TODO: Adjust input file naming to fit training data -> Done
total amount + percentage?)
TODO: Change code to add model directory if not existing -> Done
TODO: Give option to compare multiple models
TODO: Remove unnecessary comments -> Done
TODO: Improve
"
valid_loss
"
calculation
TODO: Add option to set plot directory -> Done
TODO: Use sklearn for classification
TODO: Fix difference between accuracies (stems from rounding; choose higher value instead)
TODO: Add more evaluation measures (AUROC, ROC, F1, training accuracy, etc.)
"""
"""
import
numpy
as
np
import
numpy
as
np
...
@@ -114,10 +115,11 @@ class ModelTrainer(object):
...
@@ -114,10 +115,11 @@ class ModelTrainer(object):
self
.
_model
.
eval
()
self
.
_model
.
eval
()
x_test
,
y_test
=
self
.
_training_data
[
'
test
'
]
x_test
,
y_test
=
self
.
_training_data
[
'
test
'
]
print
(
self
.
_model
(
x_test
.
float
()))
model_output
=
torch
.
round
(
self
.
_model
(
x_test
.
float
()))
model_output
=
torch
.
round
(
self
.
_model
(
x_test
.
float
()))
# acc = np.sum(model_output.numpy() == y_test.numpy())
# acc = np.sum(model_output.numpy() == y_test.numpy())
test_accuracy
=
(
model_output
==
y_test
).
float
().
mean
()
#
test_accuracy = (model_output == y_test).float().mean()
print
(
test_accuracy
)
#
print(test_accuracy)
# print(model_output.nelement())
# print(model_output.nelement())
# accuracy1 = torch.sum(torch.eq(model_output, y_test)).item() # /model_output.nelement()
# accuracy1 = torch.sum(torch.eq(model_output, y_test)).item() # /model_output.nelement()
# print(test_accuracy, accuracy1/model_output.nelement())
# print(test_accuracy, accuracy1/model_output.nelement())
...
...
This diff is collapsed.
Click to expand it.
DG_Approximation.py
+
1
−
1
View file @
55c61934
...
@@ -6,10 +6,10 @@ Plotter:
...
@@ -6,10 +6,10 @@ Plotter:
TODO: Double-check everything!
TODO: Double-check everything!
TODO: Replace loops with list comprehension if feasible
TODO: Replace loops with list comprehension if feasible
TODO: Write documentation for all methods (important)
TODO: Write documentation for all methods (important)
TODO: Contemplate how to make shock tubes comparable
TODO: Check whether
'
projection
'
is always a np.array()
TODO: Check whether
'
projection
'
is always a np.array()
TODO: Check whether all instance variables sensible
TODO: Check whether all instance variables sensible
TODO: Use cfl_number for updating, not just time
TODO: Use cfl_number for updating, not just time
TODO: Adjust code to allow classes for all equations (Burger, linear advection, 1D Euler)
"""
"""
import
os
import
os
...
...
This diff is collapsed.
Click to expand it.
Plotting.py
+
0
−
1
View file @
55c61934
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
@author: Laura C. Kühle
@author: Laura C. Kühle
TODO: Give option to select plotting color
TODO: Give option to select plotting color
TODO: Fix bug for ticks in bar plot -> Done
"""
"""
import
numpy
as
np
import
numpy
as
np
...
...
This diff is collapsed.
Click to expand it.
Troubled_Cell_Detector.py
+
3
−
0
View file @
55c61934
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
"""
"""
@author: Laura C. Kühle, Soraya Terrab (sorayaterrab)
@author: Laura C. Kühle, Soraya Terrab (sorayaterrab)
TODO: Adjust TCs for wavelet detectors (sliding window over all cells instead of every second)
TODO: Adjust Boxplot approach (adjacent cells, outer fence, etc.)
"""
"""
import
numpy
as
np
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
...
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