def test_make_knn(self, model_type, n_neighbors_val, algorithm_val, expected): model_params = {} model_params['Number of Neighbors'] = n_neighbors_val model_params['Algorithm Type'] = algorithm_val model = predict.make_model(model_type, model_params) self.assertEqual(expected, f'{model}')
def test_make_rf(self, model_type, n_estimators_val, max_depth_val, expected): model_params = {} model_params['Number of Estimators'] = n_estimators_val model_params['Max Depth'] = max_depth_val model = predict.make_model(model_type, model_params) self.assertEqual(expected, f'{model}')
def test_make_nn(self, model_type, solver_val, activation_val, max_iter_val, expected): model_params = {} model_params['Solver Type'] = solver_val model_params['Activation Function Type'] = activation_val model_params['Number of Iterations'] = max_iter_val model = predict.make_model(model_type, model_params) self.assertEqual(expected, f'{model}')
def test_train_svm_model(self, model_type, c_val, kernel, expected): # Create new Model model_params = {} model_params['C Parameter'] = c_val model_params['Kernel Type'] = kernel model = predict.make_model(model_type, model_params) return_str = predict.train_model(model, test_run=True) self.assertEqual(expected, return_str)
def test_train_knn_model(self, model_type, n_neighbors_val, algorithm_val, expected): # Create new Model model_params = {} model_params['Number of Neighbors'] = n_neighbors_val model_params['Algorithm Type'] = algorithm_val model = predict.make_model(model_type, model_params) return_str = predict.train_model(model, test_run=True) self.assertEqual(expected, return_str)
def test_train_rf_model(self, model_type, n_estimators_val, max_depth_val, expected): # Create new Model model_params = {} model_params['Number of Estimators'] = n_estimators_val model_params['Max Depth'] = max_depth_val model = predict.make_model(model_type, model_params) return_str = predict.train_model(model, test_run=True) self.assertEqual(expected, return_str)
def test_train_nn_model(self, model_type, solver_val, activation_val, max_iter_val, expected): # Create new Model model_params = {} model_params['Solver Type'] = solver_val model_params['Activation Function Type'] = activation_val model_params['Number of Iterations'] = max_iter_val model = predict.make_model(model_type, model_params) return_str = predict.train_model(model, test_run=True) self.assertEqual(expected, return_str)
def test_make_svm(self, model_type, c_val, kernel, expected): model_params = {} model_params['C Parameter'] = c_val model_params['Kernel Type'] = kernel model = predict.make_model(model_type, model_params) self.assertEqual(expected, f'{model}')