def rfbc_tune(learn_rfbc, n_feature, min_thres=30):
    """
    tuning parameters for the xgboost regression model
    :param n_feature: number of features
    :param learn_rfbc: GridLearn class object
    :return: learn_rfbc: GridLearn class object
    """
    learn_rfbc.setup_rfbc_model()
    params = {'learn__max_depth': list(range(3, 40, 4)),
        'learn__max_features': [int(0.2 * n_feature), int(0.4 * n_feature),
        int(0.6 * n_feature), int(0.8 * n_feature)], 'learn__n_estimators':
        list(range(50, 501, 100))}
    learn_rfbc.clean_and_tune(params, k=5, min_thres=min_thres)
    return learn_rfbc
