Issue with using XGBClassifier
atifov opened this issue · 1 comments
atifov commented
When I use XGBClassifier (from XGboost library) using any DES or DCS algorithm, I am getting a features_names mismatch error. I have pooled several other classifiers successfully. This error only arises when Xgboost is included in the pooled classifiers. Moreover I have successfully been able to use XGBoost in the Deslib Stacked Classifier algorithm. Please note as per previous advice, I have installed the latest version (0.3.5) of the library using the code:
pip install git+https://github.com/scikit-learn-contrib/DESlib
Following is the main code:
X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size=0.2, random_state=0)
classifiers = [LogisticRegression(), RandomForestClassifier(), RUSBoostClassifier(), XGBClassifier(), DecisionTreeClassifier()]
for c in classifiers: c.fit(X_train, Y_train)
model = RRC(pool_classifiers=classifiers, random_state=0)
model.fit(X_train, Y_train)
ValueError: feature_names mismatch: