@@ -908,7 +908,6 @@ def calibration_curve(
908
908
y_prob ,
909
909
* ,
910
910
pos_label = None ,
911
- normalize = "deprecated" ,
912
911
n_bins = 5 ,
913
912
strategy = "uniform" ,
914
913
):
@@ -934,17 +933,6 @@ def calibration_curve(
934
933
935
934
.. versionadded:: 1.1
936
935
937
- normalize : bool, default="deprecated"
938
- Whether y_prob needs to be normalized into the [0, 1] interval, i.e.
939
- is not a proper probability. If True, the smallest value in y_prob
940
- is linearly mapped onto 0 and the largest one onto 1.
941
-
942
- .. deprecated:: 1.1
943
- The normalize argument is deprecated in v1.1 and will be removed in v1.3.
944
- Explicitly normalizing `y_prob` will reproduce this behavior, but it is
945
- recommended that a proper probability is used (i.e. a classifier's
946
- `predict_proba` positive class).
947
-
948
936
n_bins : int, default=5
949
937
Number of bins to discretize the [0, 1] interval. A bigger number
950
938
requires more data. Bins with no samples (i.e. without
@@ -992,19 +980,6 @@ def calibration_curve(
992
980
check_consistent_length (y_true , y_prob )
993
981
pos_label = _check_pos_label_consistency (pos_label , y_true )
994
982
995
- # TODO(1.3): Remove normalize conditional block.
996
- if normalize != "deprecated" :
997
- warnings .warn (
998
- "The normalize argument is deprecated in v1.1 and will be removed in v1.3."
999
- " Explicitly normalizing y_prob will reproduce this behavior, but it is"
1000
- " recommended that a proper probability is used (i.e. a classifier's"
1001
- " `predict_proba` positive class or `decision_function` output calibrated"
1002
- " with `CalibratedClassifierCV`)." ,
1003
- FutureWarning ,
1004
- )
1005
- if normalize : # Normalize predicted values into interval [0, 1]
1006
- y_prob = (y_prob - y_prob .min ()) / (y_prob .max () - y_prob .min ())
1007
-
1008
983
if y_prob .min () < 0 or y_prob .max () > 1 :
1009
984
raise ValueError ("y_prob has values outside [0, 1]." )
1010
985
0 commit comments