(self,
                      instruction,
                      text=[],
                      preprocess=True,
                      test_size=0.2,
                      drop=None,
                      random_state=49,
                      learning_rate=0.1,
                      n_estimators=1000,
                      max_depth=6,
                      min_child_weight=1,
                      gamma=0,
                      subsample=0.8,
                      colsample_bytree=0.8,
                      verbosity=0,
                      objective='binary:logistic')
Calls the body of the xgboost code in the classification_models.py file. Used to create a xgboost algorithm.
        :param instruction: The objective that you want to model (str).
        :param text: A list of columns to perform text embedding on.
        :param dataset: The dataset being used in the xgboost algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param test_size: Size of the testing set (float).
        :param drop: A list of the dataset's columns to drop.
        :param random_seed: Initialize a pseudo-random number generator (int).
        :param learning_rate:  Boosting learning rate(float).
        :param n_estimators: Number of gradient boosted trees. Equivalent to number of boosting rounds(in   ).
        :param max_depth: Maximum tree depth for base learners(int).
        :param min_child_weight: Minimum sum of instance weight(hessian) needed in a child(int).
        :param gamma: Minimum loss reduction required to make a further partition on a leaf node of the tree(int).
        :param subsample: Subsample ratio of the training instance(float).
        :param colsample_bytree: Subsample ratio of columns when constructing each tree(float).
        :param objective: Specify the learning task and the corresponding learning objective or a custom
        objective function to be used (string or callable).
        :param scale_pos_weight: Balancing of positive and negative weights(float).
        :param verbose: Verbosity of printing messages. Valid values are 0 (silent), 1 (warning), 2 (info), 3 (debug).

        :return: a model and information to along with it stored in the self.models dictionary.
Calls the body of the xgboost code in the classification_models.py file. Used to create a xgboost algorithm.
        :param instruction: The objective that you want to model (str).
        :param text: A list of columns to perform text embedding on.
        :param dataset: The dataset being used in the xgboost algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param test_size: Size of the testing set (float).
        :param drop: A list of the dataset's columns to drop.
        :param random_seed: Initialize a pseudo-random number generator (int).
        :param learning_rate:  Boosting learning rate(float).
        :param n_estimators: Number of gradient boosted trees. Equivalent to number of boosting rounds(in   ).
        :param max_depth: Maximum tree depth for base learners(int).
        :param min_child_weight: Minimum sum of instance weight(hessian) needed in a child(int).
        :param gamma: Minimum loss reduction required to make a further partition on a leaf node of the tree(int).
        :param subsample: Subsample ratio of the training instance(float).
        :param colsample_bytree: Subsample ratio of columns when constructing each tree(float).
        :param objective: Specify the learning task and the corresponding learning objective or a custom
        objective function to be used (string or callable).
        :param scale_pos_weight: Balancing of positive and negative weights(float).
        :param verbose: Verbosity of printing messages. Valid values are 0 (silent), 1 (warning), 2 (info), 3 (debug).
Calls the body of the xgboost code in the classification_models . py file . Used to create a xgboost algorithm . : param instruction : The objective that you want to model ( str ) . : param text : A list of columns to perform text embedding on . : param dataset : The dataset being used in the xgboost algorithm ( str ) . : param preprocess : Preprocess the data ( bool ) . : param test_size : Size of the testing set ( float ) . : param drop : A list of the dataset s columns to drop . : param random_seed : Initialize a pseudo - random number generator ( int ) . : param learning_rate : Boosting learning rate ( float ) . : param n_estimators : Number of gradient boosted trees . Equivalent to number of boosting rounds ( in ) . : param max_depth : Maximum tree depth for base learners ( int ) . : param min_child_weight : Minimum sum of instance weight ( hessian ) needed in a child ( int ) . : param gamma : Minimum loss reduction required to make a further partition on a leaf node of the tree ( int ) . : param subsample : Subsample ratio of the training instance ( float ) . : param colsample_bytree : Subsample ratio of columns when constructing each tree ( float ) . : param objective : Specify the learning task and the corresponding learning objective or a custom objective function to be used ( string or callable ) . : param scale_pos_weight : Balancing of positive and negative weights ( float ) . : param verbose : Verbosity of printing messages . Valid values are 0 ( silent ) 1 ( warning ) 2 ( info ) 3 ( debug ) .
def xgboost_query(self,
                      instruction,
                      text=[],
                      preprocess=True,
                      test_size=0.2,
                      drop=None,
                      random_state=49,
                      learning_rate=0.1,
                      n_estimators=1000,
                      max_depth=6,
                      min_child_weight=1,
                      gamma=0,
                      subsample=0.8,
                      colsample_bytree=0.8,
                      verbosity=0,
                      objective='binary:logistic'):

        '''
        Calls the body of the xgboost code in the classification_models.py file. Used to create a xgboost algorithm.
        :param instruction: The objective that you want to model (str).
        :param text: A list of columns to perform text embedding on.
        :param dataset: The dataset being used in the xgboost algorithm (str).
        :param preprocess: Preprocess the data (bool).
        :param test_size: Size of the testing set (float).
        :param drop: A list of the dataset's columns to drop.
        :param random_seed: Initialize a pseudo-random number generator (int).
        :param learning_rate:  Boosting learning rate(float).
        :param n_estimators: Number of gradient boosted trees. Equivalent to number of boosting rounds(in   ).
        :param max_depth: Maximum tree depth for base learners(int).
        :param min_child_weight: Minimum sum of instance weight(hessian) needed in a child(int).
        :param gamma: Minimum loss reduction required to make a further partition on a leaf node of the tree(int).
        :param subsample: Subsample ratio of the training instance(float).
        :param colsample_bytree: Subsample ratio of columns when constructing each tree(float).
        :param objective: Specify the learning task and the corresponding learning objective or a custom
        objective function to be used (string or callable).
        :param scale_pos_weight: Balancing of positive and negative weights(float).
        :param verbose: Verbosity of printing messages. Valid values are 0 (silent), 1 (warning), 2 (info), 3 (debug).

        :return: a model and information to along with it stored in the self.models dictionary.
        '''

        self.models['xgboost'] = train_xgboost(instruction,
                                               dataset=self.dataset,
                                               text=[],
                                               random_state=random_state,
                                               preprocess=preprocess,
                                               drop=drop,
                                               learning_rate=learning_rate,
                                               n_estimators=n_estimators,
                                               max_depth=max_depth,
                                               min_child_weight=min_child_weight,
                                               gamma=gamma,
                                               subsample=subsample,
                                               verbosity=verbosity,
                                               colsample_bytree=colsample_bytree,
                                               objective=objective)

        self.latest_model = 'xgboost'
        clearLog()
def xgboost_query ( self , instruction , text = [ ] , preprocess = True , test_size = 0.2 , drop = None , random_state = 49 , learning_rate = 0.1 , n_estimators = 1000 , max_depth = 6 , min_child_weight = 1 , gamma = 0 , subsample = 0.8 , colsample_bytree = 0.8 , verbosity = 0 , objective = 'binary:logistic' ) : self . models [ 'xgboost' ] = train_xgboost ( instruction , dataset = self . dataset , text = [ ] , random_state = random_state , preprocess = preprocess , drop = drop , learning_rate = learning_rate , n_estimators = n_estimators , max_depth = max_depth , min_child_weight = min_child_weight , gamma = gamma , subsample = subsample , verbosity = verbosity , colsample_bytree = colsample_bytree , objective = objective ) self . latest_model = 'xgboost' clearLog ( )