-
i tried creating a stacking model like: clf1 = LogisticRegression(random_state=42) stacking_demo = StackingCVClassifier(classifiers=[clf1, clf2], meta_classifier=xgb, use_probas=True, shuffle=True, random_state=42 ) for clf, label in zip([clf1, clf2, stacking_demo],
when i run this code: i get an error like: C:\Users\tsati\anaconda3\lib\site-packages\sklearn\model_selection_validation.py:985: RuntimeWarning: Number of classes in training fold (2) does not match total number of classes (1). Results may not be appropriate for your use case. To fix this, use a cross-validation technique resulting in properly stratified folds |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Maybe it has something do do with the dataset formatting. Could you print the output from import numpy as np
print('x_train', x_train)
print('y_train', y_train)
print('y_train labels', np.unique(y_train)) |
Beta Was this translation helpful? Give feedback.
Maybe it has something do do with the dataset formatting. Could you print the output from