Skip to content
Snippets Groups Projects
Commit 55c61934 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Removed completed TODOs.

parent 5a76d2bb
No related branches found
No related tags found
No related merge requests found
...@@ -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())
......
...@@ -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
......
...@@ -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
......
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment