@@ -18,7 +18,7 @@ def mc_calibration(
1818 pred_models : dict [str , np .ndarray ] | np .ndarray ,
1919 true_models : dict [str , np .ndarray ] | np .ndarray ,
2020 model_names : Sequence [str ] = None ,
21- n_bins : int = 10 ,
21+ num_bins : int = 10 ,
2222 label_fontsize : int = 16 ,
2323 title_fontsize : int = 18 ,
2424 metric_fontsize : int = 14 ,
@@ -41,12 +41,12 @@ def mc_calibration(
4141 The one-hot-encoded true model indices per data set.
4242 model_names : list or None, optional, default: None
4343 The model names for nice plot titles. Inferred if None.
44- n_bins : int, optional, default: 10
44+ num_bins : int, optional, default: 10
4545 The number of bins to use for the calibration curves (and marginal histograms).
4646 label_fontsize : int, optional, default: 16
4747 The font size of the y-label and y-label texts
48- legend_fontsize : int, optional, default: 14
49- The font size of the legend text (ECE value )
48+ metric_fontsize : int, optional, default: 14
49+ The font size of the metric (e.g., ECE )
5050 title_fontsize : int, optional, default: 18
5151 The font size of the title text. Only relevant if `stacked=False`
5252 tick_fontsize : int, optional, default: 12
@@ -83,7 +83,7 @@ def mc_calibration(
8383 estimates = pred_models ,
8484 targets = true_models ,
8585 model_names = plot_data ["variable_names" ],
86- n_bins = n_bins ,
86+ num_bins = num_bins ,
8787 return_probs = True ,
8888 )
8989
@@ -92,7 +92,7 @@ def mc_calibration(
9292 ax .plot (ece ["probs_pred" ][j ], ece ["probs_true" ][j ], "o-" , color = color )
9393
9494 # Plot PMP distribution over bins
95- uniform_bins = np .linspace (0.0 , 1.0 , n_bins + 1 )
95+ uniform_bins = np .linspace (0.0 , 1.0 , num_bins + 1 )
9696 norm_weights = np .ones_like (plot_data ["estimates" ]) / len (plot_data ["estimates" ])
9797 ax .hist (plot_data ["estimates" ][:, j ], bins = uniform_bins , weights = norm_weights [:, j ], color = "grey" , alpha = 0.3 )
9898
0 commit comments