From 55c6193452615076b5ffa9cbd4b01f7bb940d155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BChle=2C=20Laura=20Christine=20=28lakue103=29?= <laura.kuehle@uni-duesseldorf.de> Date: Tue, 31 Aug 2021 12:51:13 +0200 Subject: [PATCH] Removed completed TODOs. --- ANN_Training.py | 18 ++++++++++-------- DG_Approximation.py | 2 +- Plotting.py | 1 - Troubled_Cell_Detector.py | 3 +++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ANN_Training.py b/ANN_Training.py index 6ce796a..3171fb3 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 732977c..d0d1bd5 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 aaac2b5..43a1663 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 028add5..b73e1f9 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 -- GitLab