From dfe85ab6ce7bb19ea8b92c65c12c3b4ec0c3f206 Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 10 Nov 2020 22:02:47 +0100 Subject: [PATCH] Add error handling at model choice --- src/processing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/processing.py b/src/processing.py index a0bd7c3..65181ac 100644 --- a/src/processing.py +++ b/src/processing.py @@ -22,6 +22,14 @@ def choose_model(model): return DecisionTreeClassifier(random_state=42) elif model == "neuralnet": return MLPClassifier(hidden_layer_sizes=10) + else: + print("Unknown model selected. The choices are: ") + print("gnb: Gaussian Naive Bayes") + print("svc: Linear Support Vector Classification") + print("knn: K-neighbors") + print("tree: Decision tree") + print("neuralnet: MLP Classifier") + exit() def predict_data(data, target, model):