def callSuitable(mlalgo, v2): """use and evaluate the selected Machine Learning algorithm""" global X, Y, XT, YT if mlalgo == 'Decision Tree': model = models.DTModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'Naive Bayes': model = models.NBModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'SVM': model = models.SVMModel(X, Y, XT, YT, v2) model.start() else: model = models.KNNModel(X, Y, XT, YT, v2) model.start()
def callSuitable(mlalgo, v2): #evaluate the selected Machine Learning algorithm global X, Y, XT, YT if mlalgo == 'Decision Tree': model = models.DTModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'Naive Bayes': model = models.NBModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'SVM': model = models.SVMModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'K Nearest Neighbours': model = models.KNNModel(X, Y, XT, YT, v2) model.start() elif mlalgo == 'Logistic Regression': model = models.LogModel(X, Y, XT, YT, v2) model.start() else: model = models.ANNModel(X, Y, XT, YT, v2) model.start()
def loadModel(modelName, fileName=None): """load the modelName ML model and test the accuracy""" global X, Y, XT, YT mlalgo = modelName if mlalgo == 'Decision Tree': model = models.DTModel(X, Y, XT, YT) model.start() elif mlalgo == 'Naive Bayes': model = models.NBModel(X, Y, XT, YT) model.start() elif mlalgo == 'SVM': model = models.SVMModel(X, Y, XT, YT) model.start() elif mlalgo == 'K Nearest Neighbours': model = models.KNNModel(X, Y, XT, YT) model.start() elif mlalgo == 'Logistic Regression': model = models.LogModel(X, Y, XT, YT) model.start() else: model = models.ANNModel(X, Y, XT, YT) model.start()
def chosen_model(): return models.DTModel()