This section includes the plotting functionalities currently supported by Fortuna.

fortuna.plot.plot_reliability_diagram(accs, confs, ax=None, labels=None, figsize=(6, 4), legend_loc=None, fontsize=10, title=None, ylim=None, linewidth=None, linestyle=None, alpha=1.0, show=False, **save_options)[source]#

Plot a reliability diagram.

  • accs (Union[Array, List[Array, ...]]) – An accuracy score for each bin. A list of multiple accuracy scores is also accepted.

  • confs (Union[Array, List[Array, ...]]) – A confidence score for each bin. A list of multiple confidence scores is also accepted.

  • labels (Optional[List[str, ...]]) – Labels used in the legend presumably describing the method used to generate accuracy and confidence scores. A list of labels, corresponding to lists of accuracies and confidences, is also accepted.

  • ax (Optional[matplotlib.axes.Axes]) – Axis matplotlib object.

  • figsize (Optional[tuple]) – Figure size.

  • legend_loc (Optional[str]) – Legend location, as in matplotlib. See here

  • fontsize (Optional[int]) – Font size.

  • title (Optional[str] = None) – Plot title.

  • ylim (Optional[Tuple[float, float]]) – Bottom and top limits on the y-axis.

  • linewidth (Optional[int]) – Line width.

  • linestyle (Optional[str]) – Line style.

  • alpha (float) – Opacity.

  • show (bool) – Whether to show the plot.

  • save_options (dict) – Options to save the file with matplotlib.pyplot.savefig. If no option is given, the file is not saved.

Return type: