def test_objective05_knn_regressor(self): automator = MLAutomator( self.x, self.y, iterations=self.iters, algo_type='regressor', specific_algos=['05'], num_cv_folds=self.folds, score_metric='neg_mean_squared_error', ) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'KNeighborRegressor')
def test_objective07_knn(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['07'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'KNeighborClassifier')
def test_objective06_logistic_regression(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['06'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'LogisticRegression')
def test_objective05_naive_bayes(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['05'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'GaussianNB')
def test_objective04_bag_of_svc(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['04'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'SVC')
def test_objective03_sgd_classifier(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['03'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'RandomForestClassifier')
def test_objective01_xgboost(self): automator=MLAutomator(self.x, self.y, iterations=self.iters, specific_algos=['01'], num_cv_folds=self.folds) automator.find_best_algorithm() self.assertEqual(automator.best_algo, 'xgboost_classifier')
from data.utilities import clf_prep from mlautomator.mlautomator import MLAutomator if __name__ == '__main__': x, y = clf_prep('boston_housing.csv') automator = MLAutomator(x, y, iterations=20) automator.find_best_algorithm() automator.print_best_space()