Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not throwing error for wrong parameters #5471

Closed
venkyyuvy opened this issue Apr 2, 2020 · 1 comment · Fixed by #5477
Closed

Not throwing error for wrong parameters #5471

venkyyuvy opened this issue Apr 2, 2020 · 1 comment · Fixed by #5477

Comments

@venkyyuvy
Copy link

venkyyuvy commented Apr 2, 2020

import xgboost
from sklearn.datasets import make_regression

xgboost.__version__
# '1.0.2'
from sklearn.datasets import make_regression
X_train, y_train = make_regression()

xgboost.XGBRegressor(wrong_param=3).fit(X_train, y_train)

XGBRegressor(base_score=0.5, booster=None, colsample_bylevel=1,
#              colsample_bynode=1, colsample_bytree=1, gamma=0, gpu_id=-1,
#              importance_type='gain', interaction_constraints=None,
#              learning_rate=0.300000012, max_delta_step=0, max_depth=6,
#              min_child_weight=1, missing=nan, monotone_constraints=None,
#              n_estimators=100, n_jobs=0, num_parallel_tree=1,
#              objective='reg:squarederror', random_state=0, reg_alpha=0,
#              reg_lambda=1, scale_pos_weight=1, subsample=1, tree_method=None,
#              validate_parameters=False, verbosity=None, wrong_param=3)
@trivialfis
Copy link
Member

Parameter validation is not yet enabled for scikit learn interface. But should be available for native interface:

xgboost.train({'foo': 'bar'}, ...)

Should throw a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants