'Probability estimates.
The returned estimates for all classes are ordered by the
label of classes.
For a multi_class problem, if multi_class is set to be "multinomial"
the softmax function is used to find the predicted probability of
each class.
Else use a one-vs-rest approach, i.e calculate the probability
of each class assuming it to be positive using the logistic function.
and normalize these values across all the classes.
Parameters
X : array-like, shape = [n_samples, n_features]
Returns
T : array-like, shape = [n_samples, n_classes]
Returns the probability of the sample for each class in the model,
where classes are ordered as they are in ``self.classes_``.'

def predict_proba(self, X):

    if (not hasattr(self, 'coef_')):
        raise NotFittedError('Call    fit    before    prediction')
    calculate_ovr = ((self.coef_.shape[0] == 1) or (self.multi_class == 'ovr'))
    if calculate_ovr:
        return super(LogisticRegression, self)._predict_proba_lr(X)
    else:
        return softmax(self.decision_function(X), copy=False)
