class_docstr: Mixin for linear classifiers.
  
  Handles prediction for sparse and dense X.
class_docstr_tok: ["Mixin","for","linear","classifiers",".","Handles","prediction","for","sparse","and","dense","X","."]
docstr: Probability estimation for OvR logistic regression.
  
  Positive class probabilities are computed as
  1. / (1. + np.exp(-self.decision_function(X)));
  multiclass is handled by normalizing that over all classes.
docstr_tok: ["Probability","estimation","for","OvR","logistic","regression",".","Positive","class","probabilities","are","computed","as","1",".","\/","(","1",".","+","np.exp","(","-self.decision_function","(","X",")",")",")",";","multiclass","is","handled","by","normalizing","that","over","all","classes","."]
code: def _predict_proba_lr(self, X):
      """Probability estimation for OvR logistic regression.
  
      Positive class probabilities are computed as
      1. / (1. + np.exp(-self.decision_function(X)));
      multiclass is handled by normalizing that over all classes.
      """
      prob = self.decision_function(X)
      prob *= -1
      np.exp(prob, prob)
      prob += 1
      np.reciprocal(prob, prob)
      if prob.ndim == 1:
          return np.vstack([1 - prob, prob]).T
      else:
          # OvR normalization, like LibLinear's predict_probability
          prob /= prob.sum(axis=1).reshape((prob.shape[0], -1))
          return prob
  
imports: from __future__ import division
  from abc import ABCMeta, abstractmethod
  import numbers
  import warnings
  import numpy
  import scipy.sparse
  from scipy import linalg
  from scipy import sparse
  from ..externals import six
  from ..externals.joblib import Parallel, delayed
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
  from ..utils import check_array, check_X_y, deprecated, as_float_array
  from ..utils.validation import FLOAT_DTYPES
  from ..utils import check_random_state
  from ..utils.extmath import safe_sparse_dot
  from ..utils.sparsefuncs import mean_variance_axis, inplace_column_scale
  from ..utils.fixes import sparse_lsqr
  from ..utils.seq_dataset import ArrayDataset, CSRDataset
  from ..utils.validation import check_is_fitted
  from ..exceptions import NotFittedError
  from ..preprocessing.data import normalize
label_desc: Use image node_id 3 for calling the LinearClassifierMixin obj's underlying member method code with example usage: obj._predict_proba_lr(X) and returns: np, prob