I'm trying to calibrate the output probabilities from a XGBClassifier.
I've provided the sample code,
x_train, x_test, y_train, y_test = train_test_split(x_var, y_var, test_size = 0.2, shuffle = False)
new_mod2 = xgb.XGBClassifier(scale_pos_weight = 1, eta = 0.3, nthread = 10, learning_rate = 0.05, max_depth = 2, n_estimators = 180, objective = 'binary:logistic' )
calibrated = CalibratedClassifierCV( base_estimator = new_mod2,method = 'Isotonic', cv=3)
calibrated.fit(X = x_train, y = y_train)
But when running the calibrated.fit() function, I get the following error:
TypeError: predict_proba() got an unexpected keyword argument 'X'
It's my understanding that the calibratedclassifiercv should work with the sklearn xgboost wrapper.
Yet the calibrated classifier cv seems to be passing the incorrect variable to the predict_proba() method of xgboost.
Is there any reason this might be occurring?