Add error handling at model choice
This commit is contained in:
parent
525d231838
commit
dfe85ab6ce
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue