class_docstr: Probability calibration with isotonic regression or sigmoid.
  
  It assumes that base_estimator has already been fit, and trains the
  calibration on the input set of the fit function. Note that this class
  should not be used as an estimator directly. Use CalibratedClassifierCV
  with cv="prefit" instead.
  
  Parameters
  ----------
  base_estimator : instance BaseEstimator
      The classifier whose output decision function needs to be calibrated
      to offer more accurate predict_proba outputs. No default value since
      it has to be an already fitted estimator.
  
  method : 'sigmoid' | 'isotonic'
      The method to use for calibration. Can be 'sigmoid' which
      corresponds to Platt's method or 'isotonic' which is a
      non-parametric approach based on isotonic regression.
  
  classes : array-like, shape (n_classes,), optional
          Contains unique classes used to fit the base estimator.
          if None, then classes is extracted from the given target values
          in fit().
  
  References
  ----------
  .. [1] Obtaining calibrated probability estimates from decision trees
         and naive Bayesian classifiers, B. Zadrozny & C. Elkan, ICML 2001
  
  .. [2] Transforming Classifier Scores into Accurate Multiclass
         Probability Estimates, B. Zadrozny & C. Elkan, (KDD 2002)
  
  .. [3] Probabilistic Outputs for Support Vector Machines and Comparisons to
         Regularized Likelihood Methods, J. Platt, (1999)
  
  .. [4] Predicting Good Probabilities with Supervised Learning,
         A. Niculescu-Mizil & R. Caruana, ICML 2005
class_docstr_tok: ["Probability","calibration","with","isotonic","regression","or","sigmoid",".","It","assumes","that","base_estimator","has","already","been","fit",",","and","trains","the","calibration","on","the","input","set","of","the","fit","function",".","Note","that","this","class","should","not","be","used","as","an","estimator","directly",".","Use","CalibratedClassifierCV","with","cv=","''","prefit","''","instead",".","Parameters","--","--","--","--","--","base_estimator",":","instance","BaseEstimator","The","classifier","whose","output","decision","function","needs","to","be","calibrated","to","offer","more","accurate","predict_proba","outputs",".","No","default","value","since","it","has","to","be","an","already","fitted","estimator",".","method",":","'sigmoid","'","|","'isotonic'","The","method","to","use","for","calibration",".","Can","be","'sigmoid","'","which","corresponds","to","Platt","'s","method","or","'isotonic","'","which","is","a","non-parametric","approach","based","on","isotonic","regression",".","classes",":","array-like",",","shape","(","n_classes",",",")",",","optional","Contains","unique","classes","used","to","fit","the","base","estimator",".","if","None",",","then","classes","is","extracted","from","the","given","target","values","in","fit","(",")",".","References","--","--","--","--","--","..","[","1","]","Obtaining","calibrated","probability","estimates","from","decision","trees","and","naive","Bayesian","classifiers",",","B.","Zadrozny","&","C.","Elkan",",","ICML","2001","..","[","2","]","Transforming","Classifier","Scores","into","Accurate","Multiclass","Probability","Estimates",",","B.","Zadrozny","&","C.","Elkan",",","(","KDD","2002",")","..","[","3","]","Probabilistic","Outputs","for","Support","Vector","Machines","and","Comparisons","to","Regularized","Likelihood","Methods",",","J.","Platt",",","(","1999",")","..","[","4","]","Predicting","Good","Probabilities","with","Supervised","Learning",",","A.","Niculescu-Mizil","&","R.","Caruana",",","ICML","2005"]
docstr: Posterior probabilities of classification
  
  This function returns posterior probabilities of classification
  according to each class on an array of test vectors X.
  
  Parameters
  ----------
  X : array-like, shape (n_samples, n_features)
      The samples.
  
  Returns
  -------
  C : array, shape (n_samples, n_classes)
      The predicted probas. Can be exact zeros.
docstr_tok: ["Posterior","probabilities","of","classification","This","function","returns","posterior","probabilities","of","classification","according","to","each","class","on","an","array","of","test","vectors","X.","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","The","samples",".","Returns","--","--","--","-","C",":","array",",","shape","(","n_samples",",","n_classes",")","The","predicted","probas",".","Can","be","exact","zeros","."]
code: def predict_proba(self, X):
      """Posterior probabilities of classification
  
      This function returns posterior probabilities of classification
      according to each class on an array of test vectors X.
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          The samples.
  
      Returns
      -------
      C : array, shape (n_samples, n_classes)
          The predicted probas. Can be exact zeros.
      """
      n_classes = len(self.classes_)
      proba = np.zeros((X.shape[0], n_classes))
  
      df, idx_pos_class = self._preproc(X)
  
      for k, this_df, calibrator in zip(
          idx_pos_class, df.T, self.calibrators_
      ):
          if n_classes == 2:
              k += 1
          proba[:, k] = calibrator.predict(this_df)
  
      # Normalize the probabilities
      if n_classes == 2:
          proba[:, 0] = 1.0 - proba[:, 1]
      else:
          proba /= np.sum(proba, axis=1)[:, np.newaxis]
  
      # XXX : for some reason all probas can be 0
      proba[np.isnan(proba)] = 1.0 / n_classes
  
      # Deal with cases where the predicted probability minimally exceeds 1.0
      proba[(1.0 < proba) & (proba <= 1.0 + 1e-5)] = 1.0
  
      return proba
  
imports: from __future__ import division
  import warnings
  from math import log
  import numpy
  from scipy.optimize import fmin_bfgs
  from sklearn.preprocessing import LabelEncoder
  from .base import BaseEstimator, ClassifierMixin, RegressorMixin, clone
  from .preprocessing import label_binarize, LabelBinarizer
  from .utils import check_X_y, check_array, indexable, column_or_1d
  from .utils.validation import check_is_fitted
  from .utils.fixes import signature
  from .isotonic import IsotonicRegression
  from .svm import LinearSVC
  from .model_selection import check_cv
  from .metrics.classification import _check_binary_probabilistic_predictions
label_desc: Use image node_id 4 for calling the _CalibratedClassifier obj's underlying member method code with example usage: obj.predict_proba(X) and returns: proba