Module Expr Str ImportFrom alias Import alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad keyword ListLoad Str Str Str keyword NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore IfExp Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr IfExp Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr ListComp CompareLt Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad keyword Num orelse Assign NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad Call NameLoad NameLoad attr If BoolOpAnd CompareIsNot NameLoad NameLoad CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad keyword SubscriptLoad NameLoad Index NameLoad orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad ListLoad Str Str Assign NameStore Call NameLoad NameLoad keyword ListLoad Str Str Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad AugAssignDiv NameStore Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad ListLoad Str Str Return SubscriptLoad AttributeLoad NameLoad attr Index Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr orelse If Call NameLoad AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq NameLoad Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Num orelse Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad keyword Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad orelse Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareEq NameLoad Num body AugAssignAdd NameStore Num Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub Num SubscriptLoad NameLoad ExtSlice Slice Index Num orelse AugAssignDiv NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad keyword Num ExtSlice Slice Index AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad BinOpDiv Num NameLoad Assign SubscriptStore NameLoad Index BinOpBitAnd CompareLt Num NameLoad CompareLtE NameLoad BinOpAdd Num Num Num Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr CompareLtE NameLoad Num Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index CompareGt NameLoad Num BinOpDiv BinOpAdd NameLoad Num BinOpAdd NameLoad Num Assign SubscriptStore NameLoad Index CompareLtE NameLoad Num BinOpDiv Num BinOpAdd NameLoad Num Assign NameStore BinOpSub Num NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num Assign NameStore BinOpDiv Num BinOpAdd Num NameLoad Assign NameStore UnaryOpUSub BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpSub Num NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return Call AttributeLoad BinOpMult NameLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num Assign NameStore BinOpDiv Num BinOpAdd Num NameLoad Assign NameStore BinOpMult NameLoad BinOpSub BinOpMult NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body AugAssignMult NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Call NameLoad BinOpDiv BinOpAdd NameLoad Num BinOpAdd NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return BinOpDiv Num BinOpAdd Num Call AttributeLoad NameLoad attr BinOpAdd BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore BinOpDiv BinOpSub NameLoad Call AttributeLoad NameLoad attr BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If BoolOpOr CompareLt Call AttributeLoad NameLoad attr Num CompareGt Call AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num BinOpAdd Num Num BinOpAdd NameLoad Num Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad NameLoad Assign NameStore CompareNotEq NameLoad Num Assign NameStore BinOpDiv SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpDiv SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return TupleLoad NameLoad NameLoad decorator_list
N/A N/A Calibration of predicted probabilities. __future__ division N/A warnings math log N/A numpy np scipy.optimize fmin_bfgs base BaseEstimator ClassifierMixin RegressorMixin clone preprocessing LabelBinarizer utils check_X_y check_array indexable column_or_1d utils.validation check_is_fitted utils.fixes signature isotonic IsotonicRegression svm LinearSVC model_selection check_cv metrics.classification _check_binary_probabilistic_predictions CalibratedClassifierCV N/A BaseEstimator ClassifierMixin N/A N/A Probability calibration with isotonic regression or sigmoid.

    With this class, the base_estimator is fit on the train set of the
    cross-validation generator and the test set is used for calibration.
    The probabilities for each of the folds are then averaged
    for prediction. In case that cv="prefit" is passed to __init__,
    it is it is assumed that base_estimator has been
    fitted already and all data is used for calibration. Note that
    data for fitting the classifier and for calibrating it must be disjoint.

    Read more in the :ref:`User Guide <calibration>`.

    Parameters
    ----------
    base_estimator : instance BaseEstimator
        The classifier whose output decision function needs to be calibrated
        to offer more accurate predict_proba outputs. If cv=prefit, the
        classifier must have been fit already on data.

    method : 'sigmoid' or 'isotonic'
        The method to use for calibration. Can be 'sigmoid' which
        corresponds to Platt's method or 'isotonic' which is a
        non-parametric approach. It is not advised to use isotonic calibration
        with too few calibration samples ``(<<1000)`` since it tends to overfit.
        Use sigmoids (Platt's calibration) in this case.

    cv : integer, cross-validation generator, iterable or "prefit", optional
        Determines the cross-validation splitting strategy.
        Possible inputs for cv are:

        - None, to use the default 3-fold cross-validation,
        - integer, to specify the number of folds.
        - An object to be used as a cross-validation generator.
        - An iterable yielding train/test splits.

        For integer/None inputs, if ``y`` is binary or multiclass,
        :class:`StratifiedKFold` used. If ``y`` is neither binary nor
        multiclass, :class:`KFold` is used.

        Refer :ref:`User Guide <cross_validation>` for the various
        cross-validation strategies that can be used here.

        If "prefit" is passed, it is assumed that base_estimator has been
        fitted already and all data is used for calibration.

    Attributes
    ----------
    classes_ : array, shape (n_classes)
        The class labels.

    calibrated_classifiers_: list (len() equal to cv or 1 if cv == "prefit")
        The list of calibrated classifiers, one for each crossvalidation fold,
        which has been fitted on all but the validation fold and calibrated
        on the validation fold.

    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
     __init__ N/A N/A self base_estimator method cv N/A None sigmoid 3 N/A N/A N/A self base_estimator base_estimator N/A N/A self method method N/A N/A self cv cv N/A fit N/A N/A self X y sample_weight N/A None N/A N/A Fit the calibrated model

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data.

        y : array-like, shape (n_samples,)
            Target values.

        sample_weight : array-like, shape = [n_samples] or None
            Sample weights. If None, then samples are equally weighted.

        Returns
        -------
        self : object
            Returns an instance of self.
         N/A N/A X y N/A check_X_y X y accept_sparse N/A csc csr coo force_all_finite False N/A N/A X y N/A indexable X y N/A lb N/A N/A N/A LabelBinarizer fit y N/A N/A self classes_ N/A lb classes_ N/A n_folds N/A N/A isinstance N/A self cv int N/A self cv N/A N/A hasattr N/A self cv n_folds N/A N/A self cv n_folds None N/A N/A n_folds N/A N/A np any N/A N/A N/A N/A np sum N/A y class_ n_folds N/A class_ N/A self classes_ N/A N/A N/A ValueError N/A Requesting %d-fold cross-validation but provided less than %d examples for at least one class. N/A n_folds n_folds N/A N/A self calibrated_classifiers_ N/A N/A N/A N/A self base_estimator None N/A N/A base_estimator N/A LinearSVC random_state 0 N/A N/A base_estimator N/A self base_estimator N/A N/A N/A self cv prefit N/A N/A calibrated_classifier N/A _CalibratedClassifier base_estimator method N/A self method N/A N/A sample_weight None N/A N/A N/A N/A calibrated_classifier fit X y sample_weight N/A N/A N/A N/A calibrated_classifier fit X y N/A N/A N/A N/A self calibrated_classifiers_ append calibrated_classifier N/A N/A cv N/A check_cv N/A self cv y classifier True N/A fit_parameters N/A N/A signature N/A base_estimator fit parameters N/A estimator_name N/A N/A type base_estimator __name__ N/A N/A N/A sample_weight None N/A sample_weight fit_parameters N/A N/A N/A N/A warnings warn N/A %s does not support sample_weight. Samples weights are only used for the calibration itself. estimator_name N/A base_estimator_sample_weight None N/A N/A base_estimator_sample_weight sample_weight N/A N/A train test N/A N/A cv split X y N/A N/A this_estimator N/A clone base_estimator N/A N/A base_estimator_sample_weight None N/A N/A N/A N/A this_estimator fit N/A X N/A train N/A y N/A train sample_weight N/A base_estimator_sample_weight N/A train N/A N/A N/A N/A this_estimator fit N/A X N/A train N/A y N/A train N/A calibrated_classifier N/A _CalibratedClassifier this_estimator method N/A self method N/A N/A sample_weight None N/A N/A N/A N/A calibrated_classifier fit N/A X N/A test N/A y N/A test N/A sample_weight N/A test N/A N/A N/A N/A calibrated_classifier fit N/A X N/A test N/A y N/A test N/A N/A N/A N/A self calibrated_classifiers_ append calibrated_classifier N/A self N/A predict_proba N/A N/A self X N/A N/A N/A 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.
         N/A N/A check_is_fitted self N/A classes_ calibrated_classifiers_ N/A X N/A check_array X accept_sparse N/A csc csr coo force_all_finite False N/A mean_proba N/A N/A np zeros N/A N/A N/A X shape N/A 0 N/A len N/A self classes_ N/A calibrated_classifier N/A self calibrated_classifiers_ N/A N/A proba N/A N/A calibrated_classifier predict_proba X N/A mean_proba proba N/A mean_proba N/A len N/A self calibrated_classifiers_ N/A mean_proba N/A predict N/A N/A self X N/A N/A N/A Predict the target of new samples. Can be different from the
        prediction of the uncalibrated classifier.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            The samples.

        Returns
        -------
        C : array, shape (n_samples,)
            The predicted class.
         N/A N/A check_is_fitted self N/A classes_ calibrated_classifiers_ N/A N/A N/A self classes_ N/A N/A N/A np argmax N/A N/A self predict_proba X axis 1 N/A N/A _CalibratedClassifier N/A object N/A N/A 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.

    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
     __init__ N/A N/A self base_estimator method N/A sigmoid N/A N/A N/A self base_estimator base_estimator N/A N/A self method method N/A _preproc N/A N/A self X N/A N/A N/A n_classes N/A len N/A self classes_ N/A N/A hasattr N/A self base_estimator decision_function N/A N/A df N/A N/A N/A self base_estimator decision_function X N/A N/A N/A df ndim 1 N/A N/A df N/A df N/A N/A N/A N/A np newaxis N/A N/A N/A hasattr N/A self base_estimator predict_proba N/A N/A df N/A N/A N/A self base_estimator predict_proba X N/A N/A n_classes 2 N/A N/A df N/A df N/A N/A N/A 1 N/A N/A N/A RuntimeError classifier has no decision_function or predict_proba method. N/A idx_pos_class N/A N/A np arange N/A N/A df shape N/A 1 N/A N/A df idx_pos_class N/A fit N/A N/A self X y sample_weight N/A None N/A N/A Calibrate the fitted model

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data.

        y : array-like, shape (n_samples,)
            Target values.

        sample_weight : array-like, shape = [n_samples] or None
            Sample weights. If None, then samples are equally weighted.

        Returns
        -------
        self : object
            Returns an instance of self.
         N/A lb N/A LabelBinarizer N/A Y N/A N/A lb fit_transform y N/A N/A self classes_ N/A lb classes_ N/A N/A df idx_pos_class N/A N/A self _preproc X N/A N/A self calibrators_ N/A N/A N/A k this_df N/A zip idx_pos_class N/A df T N/A N/A N/A N/A self method isotonic N/A N/A calibrator N/A IsotonicRegression out_of_bounds clip N/A N/A N/A N/A self method sigmoid N/A N/A calibrator N/A _SigmoidCalibration N/A N/A N/A ValueError N/A method should be "sigmoid" or "isotonic". Got %s. N/A self method N/A N/A N/A calibrator fit this_df N/A Y N/A N/A N/A k sample_weight N/A N/A N/A N/A self calibrators_ append calibrator N/A self N/A predict_proba N/A N/A self X N/A N/A N/A 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/A n_classes N/A len N/A self classes_ N/A proba N/A N/A np zeros N/A N/A N/A X shape N/A 0 n_classes N/A N/A df idx_pos_class N/A N/A self _preproc X N/A N/A k this_df calibrator N/A zip idx_pos_class N/A df T N/A self calibrators_ N/A N/A N/A n_classes 2 N/A N/A k 1 N/A N/A proba N/A N/A N/A k N/A N/A calibrator predict this_df N/A N/A n_classes 2 N/A N/A N/A proba N/A N/A N/A 0 N/A 1.0 N/A proba N/A N/A N/A 1 N/A N/A proba N/A N/A N/A np sum proba axis 1 N/A N/A N/A N/A np newaxis N/A N/A proba N/A N/A N/A np isnan proba N/A 1.0 n_classes N/A N/A proba N/A N/A N/A 1.0 proba N/A proba N/A 1.0 1e-05 1.0 N/A proba N/A N/A _sigmoid_calibration N/A N/A df y sample_weight N/A None N/A N/A Probability Calibration with sigmoid method (Platt 2000)

    Parameters
    ----------
    df : ndarray, shape (n_samples,)
        The decision function or predict proba for the samples.

    y : ndarray, shape (n_samples,)
        The targets.

    sample_weight : array-like, shape = [n_samples] or None
        Sample weights. If None, then samples are equally weighted.

    Returns
    -------
    a : float
        The slope.

    b : float
        The intercept.

    References
    ----------
    Platt, "Probabilistic Outputs for Support Vector Machines"
     N/A df N/A column_or_1d df N/A y N/A column_or_1d y N/A F df N/A tiny N/A N/A N/A np finfo N/A np float tiny N/A prior0 N/A float N/A N/A np sum N/A y 0 N/A prior1 N/A N/A N/A y shape N/A 0 prior0 N/A T N/A N/A np zeros N/A y shape N/A N/A T N/A N/A y 0 N/A N/A prior1 1.0 N/A prior1 2.0 N/A N/A T N/A N/A y 0 N/A 1.0 N/A prior0 2.0 N/A T1 N/A 1.0 T objective N/A N/A AB N/A N/A N/A E N/A N/A np exp N/A N/A N/A AB N/A 0 F N/A AB N/A 1 N/A P N/A 1.0 N/A 1.0 E N/A l N/A N/A N/A T N/A N/A np log N/A P tiny N/A T1 N/A N/A np log N/A N/A 1.0 P tiny N/A N/A sample_weight None N/A N/A N/A N/A N/A sample_weight l sum N/A N/A N/A N/A l sum N/A grad N/A N/A AB N/A N/A N/A E N/A N/A np exp N/A N/A N/A AB N/A 0 F N/A AB N/A 1 N/A P N/A 1.0 N/A 1.0 E N/A TEP_minus_T1P N/A P N/A N/A T E T1 N/A N/A sample_weight None N/A N/A TEP_minus_T1P sample_weight N/A dA N/A N/A np dot TEP_minus_T1P F N/A dB N/A N/A np sum TEP_minus_T1P N/A N/A N/A np array N/A dA dB N/A N/A AB0 N/A N/A np array N/A 0.0 N/A log N/A N/A prior0 1.0 N/A prior1 1.0 N/A AB_ N/A fmin_bfgs objective AB0 fprime grad disp False N/A N/A N/A AB_ N/A 0 N/A AB_ N/A 1 N/A _SigmoidCalibration N/A BaseEstimator RegressorMixin N/A N/A Sigmoid regression model.

    Attributes
    ----------
    a_ : float
        The slope.

    b_ : float
        The intercept.
     fit N/A N/A self X y sample_weight N/A None N/A N/A Fit the model using X, y as training data.

        Parameters
        ----------
        X : array-like, shape (n_samples,)
            Training data.

        y : array-like, shape (n_samples,)
            Training target.

        sample_weight : array-like, shape = [n_samples] or None
            Sample weights. If None, then samples are equally weighted.

        Returns
        -------
        self : object
            Returns an instance of self.
         N/A X N/A column_or_1d X N/A y N/A column_or_1d y N/A N/A X y N/A indexable X y N/A N/A N/A self a_ N/A self b_ N/A _sigmoid_calibration X y sample_weight N/A self N/A predict N/A N/A self T N/A N/A N/A Predict new data by linear interpolation.

        Parameters
        ----------
        T : array-like, shape (n_samples,)
            Data to predict from.

        Returns
        -------
        T_ : array, shape (n_samples,)
            The predicted data.
         N/A T N/A column_or_1d T N/A N/A 1.0 N/A 1.0 N/A N/A np exp N/A N/A N/A self a_ T N/A self b_ N/A N/A calibration_curve N/A N/A y_true y_prob normalize n_bins N/A False 5 N/A N/A Compute true and predicted probabilities for a calibration curve.

    Read more in the :ref:`User Guide <calibration>`.

    Parameters
    ----------
    y_true : array, shape (n_samples,)
        True targets.

    y_prob : array, shape (n_samples,)
        Probabilities of the positive class.

    normalize : bool, optional, default=False
        Whether y_prob needs to be normalized into the bin [0, 1], i.e. is not
        a proper probability. If True, the smallest value in y_prob is mapped
        onto 0 and the largest one onto 1.

    n_bins : int
        Number of bins. A bigger number requires more data.

    Returns
    -------
    prob_true : array, shape (n_bins,)
        The true probability in each bin (fraction of positives).

    prob_pred : array, shape (n_bins,)
        The mean predicted probability in each bin.

    References
    ----------
    Alexandru Niculescu-Mizil and Rich Caruana (2005) Predicting Good
    Probabilities With Supervised Learning, in Proceedings of the 22nd
    International Conference on Machine Learning (ICML).
    See section 4 (Qualitative Analysis of Predictions).
     N/A y_true N/A column_or_1d y_true N/A y_prob N/A column_or_1d y_prob N/A normalize N/A N/A y_prob N/A N/A y_prob N/A N/A y_prob min N/A N/A N/A y_prob max N/A N/A y_prob min N/A N/A N/A N/A N/A N/A y_prob min 0 N/A N/A N/A y_prob max 1 N/A N/A N/A ValueError y_prob has values outside [0, 1] and normalize is set to False. N/A y_true N/A _check_binary_probabilistic_predictions y_true y_prob N/A bins N/A N/A np linspace 0.0 N/A 1.0 1e-08 N/A n_bins 1 N/A binids N/A N/A N/A np digitize y_prob bins 1 N/A bin_sums N/A N/A np bincount binids weights y_prob minlength N/A len bins N/A bin_true N/A N/A np bincount binids weights y_true minlength N/A len bins N/A bin_total N/A N/A np bincount binids minlength N/A len bins N/A nonzero N/A bin_total 0 N/A prob_true N/A N/A bin_true N/A nonzero N/A bin_total N/A nonzero N/A prob_pred N/A N/A bin_sums N/A nonzero N/A bin_total N/A nonzero N/A N/A prob_true prob_pred N/A