Commit 0d762cde authored by Dennis Willers's avatar Dennis Willers 🏀

Mehr Printausgaben - Alle Märkte wieder einbezogen

parent e982cd2d
...@@ -40,6 +40,7 @@ def run_cross_validation(): ...@@ -40,6 +40,7 @@ def run_cross_validation():
if excluded_folder == Markt.Kein_Markt: if excluded_folder == Markt.Kein_Markt:
continue continue
config_knn.excluded_folder = excluded_folder config_knn.excluded_folder = excluded_folder
print("Konfiguration KNN: " + config_knn.__str__())
worksheet, r, evaluate_metrics, training_duration_model = run_model(config, config_knn, worksheet, r) worksheet, r, evaluate_metrics, training_duration_model = run_model(config, config_knn, worksheet, r)
model_evaluate_metrics.append(evaluate_metrics) model_evaluate_metrics.append(evaluate_metrics)
training_duration_models.append(training_duration_model) training_duration_models.append(training_duration_model)
...@@ -48,13 +49,6 @@ def run_cross_validation(): ...@@ -48,13 +49,6 @@ def run_cross_validation():
print("Speichere die Excel Tabelle") print("Speichere die Excel Tabelle")
save_excel(workbook, config, config_knn) save_excel(workbook, config, config_knn)
# config_knn = ConfigKNN(
# excluded_folder=Markt.Markt_C,
# activation_function_1_units=Aktivierungsfunktion.sigmoid,
# activation_function_128_units=Aktivierungsfunktion.ReLU,
# optimization_method=Optimierungsverfahren.SGD
# )
# run a model definition # run a model definition
def run_model(config, config_knn, worksheet, r): def run_model(config, config_knn, worksheet, r):
......
bilder: bilder:
original_path: "assets/Bilder/Datengrundlage-Reduziert-Test/" # original_path: "assets/Bilder/Datengrundlage-Reduziert-Test/"
# original_path: "assets/Bilder/Datengrundlage/" original_path: "assets/Bilder/Datengrundlage/"
knn_path: "assets/Bilder/AktuelleTrainingsUndTestdaten/" knn_path: "assets/Bilder/AktuelleTrainingsUndTestdaten/"
knn: knn:
epochs: 2 epochs: 10
result: result:
plot_path: "ressources/results/plot/" plot_path: "ressources/results/plot/"
excel_path: "ressources/results/excel/" excel_path: "ressources/results/excel/"
...@@ -4,8 +4,8 @@ from enum import Enum ...@@ -4,8 +4,8 @@ from enum import Enum
class Markt(Enum): class Markt(Enum):
Markt_A = 0, Markt_A = 0,
Markt_B = 1, Markt_B = 1,
#Markt_C = 2, Markt_C = 2,
#Markt_D = 3, Markt_D = 3,
#Markt_E = 4, Markt_E = 4,
#Markt_F = 5 Markt_F = 5
Kein_Markt = -1 Kein_Markt = -1
from src.enum.activierungsfunktionEnum import Aktivierungsfunktion from src.enum.activierungsfunktionEnum import Aktivierungsfunktion
from src.enum.marktEnum import Markt
from src.enum.optimierungsverfahren import Optimierungsverfahren from src.enum.optimierungsverfahren import Optimierungsverfahren
class ConfigKNN: class ConfigKNN:
def __init__(self, def __init__(self,
excluded_folder=None, excluded_folder=Markt.Kein_Markt,
activation_function_128_units=Aktivierungsfunktion.ReLU, activation_function_128_units=Aktivierungsfunktion.ReLU,
activation_function_1_units=Aktivierungsfunktion.ReLU, activation_function_1_units=Aktivierungsfunktion.sigmoid,
optimization_method=Optimierungsverfahren.SGD): optimization_method=Optimierungsverfahren.SGD):
self.excluded_folder = excluded_folder self.excluded_folder = excluded_folder
self.activation_function_128_units = activation_function_128_units self.activation_function_128_units = activation_function_128_units
self.activation_function_1_units = activation_function_1_units self.activation_function_1_units = activation_function_1_units
self.optimization_method = optimization_method self.optimization_method = optimization_method
def __str__(self):
return "optimization_method: " \
+ self.optimization_method.name + " - activation_function_128_units: " \
+ self.activation_function_128_units.name + ' - activation_function_1_units: ' \
+ self.activation_function_1_units.name + ' - excluded_folder: ' \
+ self.excluded_folder.name
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment