I get this error
Parameters: { "feature_types" } 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 above cases.
Here the code to reproduce it
import numpy as np
import pandas as pd
from xgboost import XGBClassifier
bool_target = pd.DataFrame(
{
"target": np.random.choice(a=[False, True], size=1000),
"random": np.random.uniform(size=1000), # add something random
"cate" : np.random.randint(0,3, size=1000),
}
)
# for each value. make sure there is a 90% match rate
bool_target["explanatory"] = np.where(np.random.uniform(size=1000) < 0.1, ~bool_target.target, bool_target.target)
X, y = bool_target.iloc[:, [1,2, 3]], bool_target.iloc[:, [0]]
m = XGBClassifier(
n_jobs=1,
use_label_encoder=False,
objective="binary:logistic",
feature_types = ['float', 'int', 'i'],
# enable_categorical=True,
eval_metric="auc").fit(X, y)
So what’s wrong here? How do I specify int types and bool types?