Warning about parameters in XGBoost function in Python?

bruno845

I have sample of code (all code is huge) like below:

def my_xgb(train, validate, features, target, 
            eta=0.03, max_depth=7, subsample = 0.7, colsample_bytree = 0.7, 
            colsample_bylevel=1,lambdaX = 1, alpha=0, gamma=0, min_child_weight=0, 
            rate_drop = 0.2, skip_drop=0.5, 
            num_boost_round = 1000, early_stopping_rounds = 50, 
            debug=True, eval_metric= ["auc"], objective = "binary:logistic", 
            seed=2017, booster = "gbtree", tree_method="exact", grow_policy="depthwise")

....

It is sample of function to calculate XGBoost model, and then when I use code below:

resHists = dict()
rang = range(4,15,2)

for x in rang:
    score, trainPred, testPred, train_history, impFig, imp = run_xgb(X_train_XGB,
                                                                     X_test_XGB,
                                                                     X_XGB,
                                                                     y_XGB,
                                                                     max_depth=x,
                                                                     early_stopping_rounds=50, debug=False)
    resHists[x]=train_history
    print(x, score)
fig, ax = plt.subplots(1, 2, figsize=(14,6))

for x in rang:
    resHists[x][['trainAUC']].add_suffix('_'+str(x)).iloc[10:].plot(ax=ax[0])
    resHists[x][['validAUC']].add_suffix('_'+str(x)).iloc[10:].plot(ax=ax[1])
plt.show()

I have error like below:

[16:53:51] WARNING: C:/Users/Administrator/workspace/xgboost-win64_release_1.3.0/src/learner.cc:541: 
Parameters: { early_stopping_rounds, lambdaX, num_boost_round, rate_drop, silent, skip_drop } might not be used.

  This may not be accurate due to some parameters are only used in language bindings but
  passed down to XGBoost core.  Or some parameters are not used but slip through this
  verification. Please open an issue if you find the above cases.

Code works and calculates everything correct but I have this warning and the below import warning does not help. It can be because of bad spelling of parameters names: { early_stopping_rounds, lambdaX, num_boost_round, rate_drop, silent, skip_drop } but it is also correct spell inf function. How can I get rid of this warning?

import warnings
warnings.filterwarnings("ignore")
warnings.simplefilter(action='ignore', category=FutureWarning)
Carlos Mougan

It seems its a warning from the xgboost package. If you want to suppress you might want to consider something like:

import xgboost as xgb

xgb.set_config(verbosity=0)

This is extracted from their documentation

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Warning about parameters in XGBoost function in Python?

From Dev

Odd warning about iconv() function

From Dev

Visual Studio warning about function not in global namespace

From Dev

Tuning XGboost parameters In R

From Dev

Warning about function prototype even when the function takes arguments

From Dev

Warning about function prototype even when the function takes arguments

From Dev

design issue about multiple parameters in a function

From Dev

Python - explain function parameters

From Dev

Check parameters of a function in a Python

From Dev

passing parameters in python function

From Dev

MATLAB vision.ShapeInserter() function gives warning about CustomBorderColor attribute

From Java

Typescript | Warning about Missing Return Type of function, ESLint

From Dev

No warning about unused parameter in template function with gcc but with Clang

From Dev

No warning about unused parameter in template function with gcc but with Clang

From Dev

R xgboost package parameters relation

From Dev

About a simple recursive function in python

From Dev

python and PEP 440 - how serious is this warning about PEP440?

From Dev

Seek python warning for a multiply defined function

From Dev

Seek python warning for a multiply defined function

From Dev

Maximize a function with many parameters (python)

From Dev

Get the order of parameters for python function?

From Dev

dynamic array of parameters to function python

From Dev

Python Matplotlib callback function with parameters

From Dev

Pattern matching on function parameters in Python

From Dev

Passing a list of parameters into a Python function

From Dev

Parameters passed to nested Function in Python

From Dev

require named parameters in python function

From Dev

Passing SOME of the parameters to a function in python

From Dev

dynamic array of parameters to function python

Related Related

  1. 1

    Warning about parameters in XGBoost function in Python?

  2. 2

    Odd warning about iconv() function

  3. 3

    Visual Studio warning about function not in global namespace

  4. 4

    Tuning XGboost parameters In R

  5. 5

    Warning about function prototype even when the function takes arguments

  6. 6

    Warning about function prototype even when the function takes arguments

  7. 7

    design issue about multiple parameters in a function

  8. 8

    Python - explain function parameters

  9. 9

    Check parameters of a function in a Python

  10. 10

    passing parameters in python function

  11. 11

    MATLAB vision.ShapeInserter() function gives warning about CustomBorderColor attribute

  12. 12

    Typescript | Warning about Missing Return Type of function, ESLint

  13. 13

    No warning about unused parameter in template function with gcc but with Clang

  14. 14

    No warning about unused parameter in template function with gcc but with Clang

  15. 15

    R xgboost package parameters relation

  16. 16

    About a simple recursive function in python

  17. 17

    python and PEP 440 - how serious is this warning about PEP440?

  18. 18

    Seek python warning for a multiply defined function

  19. 19

    Seek python warning for a multiply defined function

  20. 20

    Maximize a function with many parameters (python)

  21. 21

    Get the order of parameters for python function?

  22. 22

    dynamic array of parameters to function python

  23. 23

    Python Matplotlib callback function with parameters

  24. 24

    Pattern matching on function parameters in Python

  25. 25

    Passing a list of parameters into a Python function

  26. 26

    Parameters passed to nested Function in Python

  27. 27

    require named parameters in python function

  28. 28

    Passing SOME of the parameters to a function in python

  29. 29

    dynamic array of parameters to function python

HotTag

Archive