(x, y, metric, clf, cutoff, iters, max_rounds, delta, silent)
return keep_vars
Function loops through, waiting for the stopping criteria to change
    :param x: X dataframe One Hot Encoded
    :param y: Labels for the target variable
    :param metric: The metric to optimize in XGBoost
    :return: names of the variables to keep
Function loops through, waiting for the stopping criteria to change
    :param x: X dataframe One Hot Encoded
    :param y: Labels for the target variable
    :param metric: The metric to optimize in XGBoost
    :return: names of the variables to keep
Function loops through waiting for the stopping criteria to change : param x : X dataframe One Hot Encoded : param y : Labels for the target variable : param metric : The metric to optimize in XGBoost : return : names of the variables to keep
def _BoostARoota(x, y, metric, clf, cutoff, iters, max_rounds, delta, silent):
    """
    Function loops through, waiting for the stopping criteria to change
    :param x: X dataframe One Hot Encoded
    :param y: Labels for the target variable
    :param metric: The metric to optimize in XGBoost
    :return: names of the variables to keep
    """

    new_x = x.copy()
    #Run through loop until "crit" changes
    i = 0
    while True:
        #Inside this loop we reduce the dataset on each iteration exiting with keep_vars
        i += 1
        if clf is None:
            crit, keep_vars = _reduce_vars_xgb(new_x,
                                               y,
                                               metric=metric,
                                               this_round=i,
                                               cutoff=cutoff,
                                               n_iterations=iters,
                                               delta=delta,
                                               silent=silent)
        else:
            crit, keep_vars = _reduce_vars_sklearn(new_x,
                                                   y,
                                                   clf=clf,
                                                   this_round=i,
                                                   cutoff=cutoff,
                                                   n_iterations=iters,
                                                   delta=delta,
                                                   silent=silent)

        if crit | (i >= max_rounds):
            break  # exit and use keep_vars as final variables
        else:
            new_x = new_x[keep_vars].copy()
    if not silent:
        print("BoostARoota ran successfully! Algorithm went through ", i, " rounds.")
    return keep_vars
def _BoostARoota ( x , y , metric , clf , cutoff , iters , max_rounds , delta , silent ) : new_x = x . copy ( ) #Run through loop until "crit" changes i = 0 while True : #Inside this loop we reduce the dataset on each iteration exiting with keep_vars i += 1 if clf is None : crit , keep_vars = _reduce_vars_xgb ( new_x , y , metric = metric , this_round = i , cutoff = cutoff , n_iterations = iters , delta = delta , silent = silent ) else : crit , keep_vars = _reduce_vars_sklearn ( new_x , y , clf = clf , this_round = i , cutoff = cutoff , n_iterations = iters , delta = delta , silent = silent ) if crit | ( i >= max_rounds ) : break # exit and use keep_vars as final variables else : new_x = new_x [ keep_vars ] . copy ( ) if not silent : print ( "BoostARoota ran successfully! Algorithm went through " , i , " rounds." ) return keep_vars