def predict_proba(self, X):
"""
Predict class probabilities for X.
:param X: {array-like, sparse matrix}, shape (n_samples, n_features). Input data, where `n_samples` is the
number of samples and `n_features` is the number of features.
:return: Returns self.
"""
# Numpy
X = np.array(X)
# Check is fit had been called
check_is_fitted(self, ['X_', 'y_'])
# Input validation
X = check_array(X)
return self.model.predict_proba(X, verbose=self.verbose)
评论列表
文章目录