- XGBClassifier.predict_proba(data, ntree_limit=None, **kw)#
Predict the probability of each X example being of a given class. If the model is trained with early stopping, then
best_iterationis used automatically. The estimator uses inplace_predict by default and falls back to using
DMatrixif devices between the data and the estimator don’t match.
This function is only thread safe for gbtree and dart.
X ((Not supported yet)) – Feature matrix. See py-data for a list of supported types.
validate_features ((Not supported yet)) – When this is True, validate that the Booster’s and data’s feature_names are identical. Otherwise, it is assumed that the feature_names are the same.
base_margin ((Not supported yet)) – Margin added to prediction.
iteration_range ((Not supported yet)) – Specifies which layer of trees are used in prediction. For example, if a random forest is trained with 100 rounds. Specifying iteration_range=(10, 20), then only the forests built during [10, 20) (half open set) rounds are used in this prediction.
a numpy array of shape array-like of shape (n_samples, n_classes) with the probability of each data example being of a given class.
- Return type
This docstring was copied from xgboost.sklearn.XGBClassifier.