def predict_proba(self, X):
        """Predict class probabilities for X.

        Parameters
        ----------
        X : array-like of shape = [n_samples, n_features]
            The input samples.

        Raises
        ------
        AttributeError
            If the ``loss`` does not support probabilities.

        Returns
        -------
        p : array of shape = [n_samples]
            The class probabilities of the input samples. The order of the
            classes corresponds to that in the attribute `classes_`.
        """
        score = self.decision_function(X)
        try:
            return self.loss_._score_to_proba(score)
        except NotFittedError:
            raise
        except __HOLE__:
            raise AttributeError('loss=%r does not support predict_proba' %
                                 self.loss)
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/gradient_boosting.py/GradientBoostingClassifier.predict_proba