diff --git a/ANN_Training.py b/ANN_Training.py index 6ce796aec14430cc5705cd558ee52724a5421e7d..3171fb39f74115bb9aeee3e698470b98a63c940a 100644 --- a/ANN_Training.py +++ b/ANN_Training.py @@ -3,13 +3,14 @@ @author: Laura C. Kühle, Soraya Terrab (sorayaterrab) TODO: Improve 'epoch_training()' -TODO: Add ANN testing from Soraya -> Done TODO: Add ANN classification from Soraya -TODO: Improve naming of training data/model (maybe different folders?) -TODO: Adjust input file naming to fit training data -> Done -TODO: Change code to add model directory if not existing -> Done -TODO: Remove unnecessary comments -> Done -TODO: Add option to set plot directory -> Done +TODO: Improve naming of training data/model (maybe different folders?; split training data leter; + total amount + percentage?) +TODO: Give option to compare multiple models +TODO: Improve "valid_loss" calculation +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 @@ -114,10 +115,11 @@ class ModelTrainer(object): self._model.eval() x_test, y_test = self._training_data['test'] + print(self._model(x_test.float())) model_output = torch.round(self._model(x_test.float())) # acc = np.sum(model_output.numpy() == y_test.numpy()) - test_accuracy = (model_output == y_test).float().mean() - print(test_accuracy) + # test_accuracy = (model_output == y_test).float().mean() + # print(test_accuracy) # print(model_output.nelement()) # accuracy1 = torch.sum(torch.eq(model_output, y_test)).item() # /model_output.nelement() # print(test_accuracy, accuracy1/model_output.nelement()) diff --git a/DG_Approximation.py b/DG_Approximation.py index 732977c5ff9677fd7b240b09cc45c2f659dfef76..d0d1bd5eab44b294cc998bb6f8096c21dc10cd4b 100644 --- a/DG_Approximation.py +++ b/DG_Approximation.py @@ -6,10 +6,10 @@ Plotter: TODO: Double-check everything! TODO: Replace loops with list comprehension if feasible 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 all instance variables sensible 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 diff --git a/Plotting.py b/Plotting.py index aaac2b5078eafcaaa5f930040e5507af6e807a7e..43a16632d2358d1a57a3c3024937e7da4b3ea1be 100644 --- a/Plotting.py +++ b/Plotting.py @@ -3,7 +3,6 @@ @author: Laura C. Kühle TODO: Give option to select plotting color -TODO: Fix bug for ticks in bar plot -> Done """ import numpy as np diff --git a/Troubled_Cell_Detector.py b/Troubled_Cell_Detector.py index 028add527c6b4a0270497eee419e1210b46a8d32..b73e1f9d99fc1edc1ffff841c5a2ae14236d0ec7 100644 --- a/Troubled_Cell_Detector.py +++ b/Troubled_Cell_Detector.py @@ -2,6 +2,9 @@ """ @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 matplotlib.pyplot as plt