We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reproducer:
import pandas as pd import numpy as np import xgboost as xgb rng = np.random.default_rng(seed=0) x0 = rng.integers(low=0, high=3, size=20) x1 = rng.integers(low=0, high=5, size=20) noise = rng.normal(loc=0, scale=0.1, size=20) df = pd.DataFrame({'x0': x0, 'x1': x1}).astype('category') X = np.column_stack((x0, x1)) y = (x0 * 10 - 20) + (x1 - 2) + noise params = {'tree_method': 'gpu_hist', 'predictor': 'gpu_predictor', 'enable_experimental_json_serialization': True, 'max_depth': 3, 'learning_rate': 1.0} dtrain = xgb.DMatrix(df, label=y, enable_categorical=True) bst = xgb.train(params, dtrain, num_boost_round=5, evals=[(dtrain, 'train')]) print(bst.predict(dtrain, pred_leaf=True))
Log:
[0] train-rmse:2.24335 [1] train-rmse:0.80826 [2] train-rmse:0.40489 [3] train-rmse:0.19489 [4] train-rmse:0.13504 [[6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6] [6 6 6 6 6]]
Note to others: The categorical split feature is currently in experimental status.
The text was updated successfully, but these errors were encountered:
Closing in favor of #6503 .
Sorry, something went wrong.
No branches or pull requests
Reproducer:
Log:
Note to others: The categorical split feature is currently in experimental status.
The text was updated successfully, but these errors were encountered: