Module Import alias identifier ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign TupleStore NameStore NameStore Call NameLoad keyword BinOpMult Num NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num attr keyword AttributeLoad NameLoad attr AugAssignSub NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num Assign NameStore Call NameLoad NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore ListLoad TupleLoad NameLoad NameLoad TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body For NameStore ListLoad Str Str body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Num keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpSub BinOpMult Num NameLoad Num keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod BinOpAdd NameLoad Num Num keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num If CompareEq NameLoad Str body Expr Call NameLoad NameLoad BinOpSub Num NameLoad orelse Expr Call NameLoad Call NameLoad NameLoad NameLoad Call NameLoad BinOpMod BinOpAdd NameLoad Num Num NameLoad Assign NameStore Call NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad keyword Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore Num Assign TupleStore NameStore NameStore Call NameLoad keyword BinOpMult Num NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num attr keyword Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad For NameStore ListLoad Str Str body Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Str Expr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpSub NameLoad NameLoad Expr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign TupleStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Str Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore ListLoad Str Str body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num Call AttributeLoad NameLoad attr Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad Return BinOpDiv NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Num Num decorator_list Assign NameStore Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num keyword Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num Num Assign NameStore Call NameLoad keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad For NameStore ListLoad Str Str body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign TupleStore NameStore NameStore Call NameLoad keyword BinOpMult Num NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num attr keyword AttributeLoad NameLoad attr AugAssignSub NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice NameLoad Assign TupleStore NameStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice NameLoad BinOpMult Num NameLoad SubscriptLoad NameLoad Slice NameLoad BinOpMult Num NameLoad SubscriptLoad NameLoad Slice NameLoad BinOpMult Num NameLoad Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice BinOpMult Num NameLoad SubscriptLoad NameLoad Slice BinOpMult Num NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num For TupleStore NameStore NameStore ListLoad TupleLoad NameLoad NameLoad TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body For NameStore ListLoad Str Str body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Str For NameStore ListLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Expr Call NameLoad NameLoad SubscriptLoad Call AttributeLoad NameLoad attr ListLoad Num Num Index Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Num Assign NameStore BinOpDiv Num BinOpAdd Num Call AttributeLoad NameLoad attr BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad Call AttributeLoad Call NameLoad attr NameLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad keyword Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult NameLoad Num keyword Num keyword NameLoad Expr Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad Num Expr Call NameLoad NameLoad ListLoad Num Num Expr Call NameLoad NameLoad ListLoad Num Num Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Num ListLoad Num keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num keyword Num keyword Num Assign SubscriptStore NameLoad Index TupleLoad Num Num AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListLoad TupleLoad Str Call NameLoad TupleLoad Str Call NameLoad keyword Num Assign NameStore Call NameLoad NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A numpy np scipy sparse sklearn.utils.testing assert_array_almost_equal assert_equal assert_greater assert_almost_equal assert_greater_equal assert_array_equal assert_raises ignore_warnings assert_warns_message sklearn.datasets make_classification make_blobs sklearn.naive_bayes MultinomialNB sklearn.ensemble RandomForestClassifier RandomForestRegressor sklearn.svm LinearSVC sklearn.linear_model Ridge sklearn.pipeline Pipeline sklearn.preprocessing Imputer sklearn.metrics brier_score_loss log_loss sklearn.calibration CalibratedClassifierCV sklearn.calibration _sigmoid_calibration _SigmoidCalibration sklearn.calibration calibration_curve test_calibration N/A N/A N/A N/A N/A Test calibration objects with isotonic and sigmoid N/A n_samples 100 N/A N/A X y N/A make_classification n_samples N/A 2 n_samples n_features 6 random_state 42 N/A sample_weight N/A N/A N/A N/A N/A np random RandomState seed 42 uniform size N/A y size N/A X N/A N/A X min N/A N/A X_train y_train sw_train N/A N/A X N/A n_samples N/A y N/A n_samples N/A sample_weight N/A n_samples N/A N/A X_test y_test N/A N/A X N/A n_samples N/A y N/A n_samples N/A clf N/A N/A N/A MultinomialNB fit X_train y_train sample_weight sw_train N/A prob_pos_clf N/A N/A N/A clf predict_proba X_test N/A N/A N/A 1 N/A pc_clf N/A CalibratedClassifierCV clf cv N/A N/A y size 1 N/A N/A assert_raises ValueError N/A pc_clf fit X y N/A N/A this_X_train this_X_test N/A N/A X_train X_test N/A N/A N/A sparse csr_matrix X_train N/A N/A sparse csr_matrix X_test N/A N/A method N/A isotonic sigmoid N/A N/A pc_clf N/A CalibratedClassifierCV clf method method cv 2 N/A N/A N/A pc_clf fit this_X_train y_train sample_weight sw_train N/A prob_pos_pc_clf N/A N/A N/A pc_clf predict_proba this_X_test N/A N/A N/A 1 N/A N/A assert_greater N/A brier_score_loss y_test prob_pos_clf N/A brier_score_loss y_test prob_pos_pc_clf N/A N/A N/A pc_clf fit this_X_train N/A y_train 1 sample_weight sw_train N/A prob_pos_pc_clf_relabeled N/A N/A N/A pc_clf predict_proba this_X_test N/A N/A N/A 1 N/A N/A assert_array_almost_equal prob_pos_pc_clf prob_pos_pc_clf_relabeled N/A N/A N/A pc_clf fit this_X_train N/A N/A 2 y_train 1 sample_weight sw_train N/A prob_pos_pc_clf_relabeled N/A N/A N/A pc_clf predict_proba this_X_test N/A N/A N/A 1 N/A N/A assert_array_almost_equal prob_pos_pc_clf prob_pos_pc_clf_relabeled N/A N/A N/A pc_clf fit this_X_train N/A N/A y_train 1 2 sample_weight sw_train N/A prob_pos_pc_clf_relabeled N/A N/A N/A pc_clf predict_proba this_X_test N/A N/A N/A 1 N/A N/A method sigmoid N/A N/A N/A assert_array_almost_equal prob_pos_pc_clf N/A 1 prob_pos_pc_clf_relabeled N/A N/A N/A assert_greater N/A brier_score_loss y_test prob_pos_clf N/A brier_score_loss N/A N/A y_test 1 2 prob_pos_pc_clf_relabeled N/A clf_base_regressor N/A CalibratedClassifierCV N/A Ridge N/A N/A N/A clf_base_regressor fit X_train y_train N/A N/A N/A clf_base_regressor predict X_test N/A clf_invalid_method N/A CalibratedClassifierCV clf method foo N/A N/A assert_raises ValueError N/A clf_invalid_method fit X_train y_train N/A clf_base_regressor N/A CalibratedClassifierCV N/A RandomForestRegressor method sigmoid N/A N/A assert_raises RuntimeError N/A clf_base_regressor fit X_train y_train N/A ignore_warnings test_sample_weight_warning N/A N/A N/A N/A N/A n_samples 100 N/A N/A X y N/A make_classification n_samples N/A 2 n_samples n_features 6 random_state 42 N/A sample_weight N/A N/A N/A N/A N/A np random RandomState seed 42 uniform size N/A len y N/A N/A X_train y_train sw_train N/A N/A X N/A n_samples N/A y N/A n_samples N/A sample_weight N/A n_samples N/A X_test N/A X N/A n_samples N/A method N/A sigmoid isotonic N/A N/A base_estimator N/A LinearSVC random_state 42 N/A calibrated_clf N/A CalibratedClassifierCV base_estimator method method N/A msg LinearSVC does not support sample_weight. N/A N/A assert_warns_message UserWarning msg N/A calibrated_clf fit X_train y_train sample_weight sw_train N/A probs_with_sw N/A N/A calibrated_clf predict_proba X_test N/A N/A N/A calibrated_clf fit X_train y_train N/A probs_without_sw N/A N/A calibrated_clf predict_proba X_test N/A diff N/A N/A N/A np linalg norm N/A probs_with_sw probs_without_sw N/A N/A assert_greater diff 0.1 N/A test_calibration_multiclass N/A N/A N/A N/A N/A Test calibration for multiclass  N/A clf N/A LinearSVC N/A N/A X y_idx N/A make_blobs n_samples 100 n_features 2 random_state 42 centers 3 cluster_std 3.0 N/A target_names N/A N/A np array N/A a b c N/A y N/A target_names N/A y_idx N/A N/A X_train y_train N/A N/A X N/A 2 N/A y N/A 2 N/A N/A X_test y_test N/A N/A X N/A 1 2 N/A y N/A 1 2 N/A N/A N/A clf fit X_train y_train N/A method N/A isotonic sigmoid N/A N/A cal_clf N/A CalibratedClassifierCV clf method method cv 2 N/A N/A N/A cal_clf fit X_train y_train N/A probas N/A N/A cal_clf predict_proba X_test N/A N/A assert_array_almost_equal N/A N/A np sum probas axis 1 N/A N/A np ones N/A len X_test softmax N/A N/A y_pred N/A N/A N/A e N/A N/A np exp N/A y_pred N/A N/A e N/A N/A N/A N/A e sum axis 1 reshape -1 1 N/A N/A uncalibrated_log_loss N/A log_loss y_test N/A softmax N/A N/A clf decision_function X_test N/A calibrated_log_loss N/A log_loss y_test probas N/A N/A assert_greater_equal uncalibrated_log_loss calibrated_log_loss N/A N/A X y N/A make_blobs n_samples 100 n_features 2 random_state 42 cluster_std 3.0 N/A N/A X_train y_train N/A N/A X N/A 2 N/A y N/A 2 N/A N/A X_test y_test N/A N/A X N/A 1 2 N/A y N/A 1 2 N/A clf N/A RandomForestClassifier n_estimators 10 random_state 42 N/A N/A N/A clf fit X_train y_train N/A clf_probs N/A N/A clf predict_proba X_test N/A loss N/A log_loss y_test clf_probs N/A method N/A isotonic sigmoid N/A N/A cal_clf N/A CalibratedClassifierCV clf method method cv 3 N/A N/A N/A cal_clf fit X_train y_train N/A cal_clf_probs N/A N/A cal_clf predict_proba X_test N/A cal_loss N/A log_loss y_test cal_clf_probs N/A N/A assert_greater loss cal_loss N/A test_calibration_prefit N/A N/A N/A N/A N/A Test calibration for prefitted classifiers N/A n_samples 50 N/A N/A X y N/A make_classification n_samples N/A 3 n_samples n_features 6 random_state 42 N/A sample_weight N/A N/A N/A N/A N/A np random RandomState seed 42 uniform size N/A y size N/A X N/A N/A X min N/A N/A X_train y_train sw_train N/A N/A X N/A n_samples N/A y N/A n_samples N/A sample_weight N/A n_samples N/A N/A X_calib y_calib sw_calib N/A N/A X N/A n_samples N/A 2 n_samples N/A y N/A n_samples N/A 2 n_samples N/A sample_weight N/A n_samples N/A 2 n_samples N/A N/A X_test y_test N/A N/A X N/A N/A 2 n_samples N/A y N/A N/A 2 n_samples N/A clf N/A MultinomialNB N/A N/A N/A clf fit X_train y_train sw_train N/A prob_pos_clf N/A N/A N/A clf predict_proba X_test N/A N/A N/A 1 N/A N/A this_X_calib this_X_test N/A N/A X_calib X_test N/A N/A N/A sparse csr_matrix X_calib N/A N/A sparse csr_matrix X_test N/A N/A method N/A isotonic sigmoid N/A N/A pc_clf N/A CalibratedClassifierCV clf method method cv prefit N/A sw N/A sw_calib None N/A N/A N/A N/A pc_clf fit this_X_calib y_calib sample_weight sw N/A y_prob N/A N/A pc_clf predict_proba this_X_test N/A y_pred N/A N/A pc_clf predict this_X_test N/A prob_pos_pc_clf N/A y_prob N/A N/A N/A 1 N/A N/A assert_array_equal y_pred N/A N/A N/A np array N/A 0 1 N/A N/A N/A np argmax y_prob axis 1 N/A N/A assert_greater N/A brier_score_loss y_test prob_pos_clf N/A brier_score_loss y_test prob_pos_pc_clf N/A test_sigmoid_calibration N/A N/A N/A N/A N/A Test calibration values with Platt sigmoid model N/A exF N/A N/A np array N/A 5 -4 1.0 N/A exY N/A N/A np array N/A 1 -1 -1 N/A AB_lin_libsvm N/A N/A np array N/A -0.202613543912 0.6523631498 N/A N/A assert_array_almost_equal AB_lin_libsvm N/A _sigmoid_calibration exF exY 3 N/A lin_prob N/A 1.0 N/A 1.0 N/A N/A np exp N/A N/A N/A AB_lin_libsvm N/A 0 exF N/A AB_lin_libsvm N/A 1 N/A sk_prob N/A N/A N/A N/A N/A _SigmoidCalibration fit exF exY predict exF N/A N/A assert_array_almost_equal lin_prob sk_prob 6 N/A N/A assert_raises ValueError N/A N/A _SigmoidCalibration fit N/A N/A np vstack N/A exF exF exY N/A test_calibration_curve N/A N/A N/A N/A N/A Check calibration_curve function N/A y_true N/A N/A np array N/A 0 0 0 1 1 1 N/A y_pred N/A N/A np array N/A 0.0 0.1 0.2 0.8 0.9 1.0 N/A N/A prob_true prob_pred N/A calibration_curve y_true y_pred n_bins 2 N/A N/A prob_true_unnormalized prob_pred_unnormalized N/A calibration_curve y_true N/A y_pred 2 n_bins 2 normalize True N/A N/A assert_equal N/A len prob_true N/A len prob_pred N/A N/A assert_equal N/A len prob_true 2 N/A N/A assert_almost_equal prob_true N/A 0 1 N/A N/A assert_almost_equal prob_pred N/A 0.1 0.9 N/A N/A assert_almost_equal prob_true prob_true_unnormalized N/A N/A assert_almost_equal prob_pred prob_pred_unnormalized N/A N/A assert_raises ValueError calibration_curve N/A 1.1 N/A -0.1 normalize False N/A test_calibration_nan_imputer N/A N/A N/A N/A N/A Test that calibration can accept nan N/A N/A X y N/A make_classification n_samples 10 n_features 2 n_informative 2 n_redundant 0 random_state 42 N/A N/A X N/A N/A 0 0 N/A np nan N/A clf N/A Pipeline N/A N/A imputer N/A Imputer N/A rf N/A RandomForestClassifier n_estimators 1 N/A clf_c N/A CalibratedClassifierCV clf cv 2 method isotonic N/A N/A N/A clf_c fit X y N/A N/A N/A clf_c predict X N/A