text_plain_output_1.png
from imblearn.over_sampling import SMOTE

from xgboost import XGBClassifier

from xgboost import XGBClassifier
xgb = XGBClassifier(objective='binary:logistic')
xgb.fit(X_train, y_train)
pred = xgb.predict(X_val)

from imblearn.over_sampling import SMOTE
method = SMOTE()
X_resampled, y_resampled = method.fit_sample(X_train, y_train)
xgb.fit(X_resampled, y_resampled)
pred1 = xgb.predict(X_val)
print('Train Score: ', xgb.score(X_resampled, y_resampled))
print('Test Score: ', xgb.score(X_val, y_val))