[Python] How to show error output between boosting rounds in XGBoost?

Discussão em 'Python' iniciado por Stack, Março 10, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Scikit-Learn API, XGBRegressor. I'm trying to make my model as verbose as possible. These are the parameters of the model. This is running on Kaggle kernels. df_train and df_target are pandas dataframes.

    model = xgb.XGBRegressor(
    n_estimators=2**8,
    max_depth=5,
    learning_rate=0.04,
    subsample=0.9,
    colsample_bytree=0.9,
    objective='reg:squarederror',
    booster='gbtree',
    importance_type='weight',
    tree_method='gpu_hist',
    silent=False,
    random_state=SEED
    )


    and this is the parameters of fit(). I have to see training rmse between boosting rounds like in the LightGBM. Does XGBoost have that functionality?

    model.fit(df_train, df_target, eval_metric='rmse', eval_set=[(df_train, df_target)], verbose=True)

    Continue reading...

Compartilhe esta Página