ratio_bland_atlman_figure#

petpal.utils.testing_utils.ratio_bland_atlman_figure(axes, fit_values: numpy.ndarray, true_values: numpy.ndarray, ax_titles: list[str], sca_kwargs: dict = None, bland_kwargs: dict = None)#

Generates a ratio Bland-Altman plot for the specified axes, fitted and true values.

The function is intended to be used to generate multiple sets of figures for comparing multiple fit parameters. The format of the values is values=[[first_param, second_param, ...], [first_param, second_param, ...], ..].

Parameters:
  • axes (list[matplotlib.axes]) – The axes on which to generate the ratio Bland-Altman plot.

  • fit_values (np.ndarray) – The fitted values to plot.

  • true_values (np.ndarray) – The true values to plot.

  • ax_titles (list[str]) – Titles of the axes.

  • sca_kwargs (dict, optional) – Additional keyword arguments for the scatter plot. Defaults to red dots.

  • bland_kwargs (dict, optional) – Additional keyword arguments for ratio Bland-Altman lines. Defaults to a red.

Note

A ratio Bland-Altman plot considers ratios, instead of differences, between the two methods; useful when the difference between the measures depends on the size of the measurement.