示例#1
0
 def optimization(self):
     """
     grid search for optimized parameters
     :return:
     """
     self.get_default_model()
     self.best_params, self.best_scores = search(self.model,
                                                 self.get_model_name(),
                                                 self.X, self.y,
                                                 self.params)
示例#2
0
 def optimization(self):
     """
     function to perform grid search of best parameters
     :return:
     """
     self.get_default_model()
     self.best_params, self.best_scores = search(self.model,
                                                 self.get_model_name(),
                                                 self.X, self.y,
                                                 self.params)
示例#3
0
 def select_ensemble_model(self, P_train, Y_train):
     """
     function to select ensemble parameters
     :param P_train:
     :param Y_train:
     :return: best parameters
     """
     ensemble_clf = LogisticRegression(random_state=RANDOM_STATE)
     best_params, self.best_scores = search(ensemble_clf, "ensemble",
                                            P_train, Y_train,
                                            self.params["ensemble"])
     logging.info("Best parameters for ensemble: {}".format(best_params))
     return best_params
 def optimization(self):
     self.get_default_model()
     self.best_params, self.best_scores = search(self.model,
                                                 self.get_model_name(),
                                                 self.X, self.y,
                                                 self.params)