def predict_proba(self, X):
        prob = self.decision_function(X)
        prob *= -1
        np.exp(prob, prob)
        prob += 1
        np.reciprocal(prob, prob)
        if len(self.classes_) == 2:  # binary case
            return np.column_stack([1 - prob, prob])
        else:
            # OvR normalization, like LibLinear's predict_probability
            prob /= prob.sum(axis=1).reshape((prob.shape[0], -1))
            return prob
Estimate probability.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/discriminant_analysis.py/LinearDiscriminantAnalysis.predict_proba