nifreeze.viz.bland_altman module

Bland-Altman plot.

class nifreeze.viz.bland_altman.BASalientEntityColor(self, *args, **kwds)[source]

Bases: Enum

LEFT_COLOR = 'left_color'
RELIABLE_COLOR = 'reliable_color'
RIGHT_COLOR = 'right_color'
nifreeze.viz.bland_altman.plot_bland_altman(data1: ndarray, data2: ndarray, ci: float = 0.95, salient_data: dict | None = None, figsize: tuple | None = (15, 10)) matplotlib.pyplot.Figure[source]

Create a Bland-Altman plot.

Create a Bland-Altman plot [Bland86] and highlight size lower and upper extremes along the X coordinates.

Parameters:
  • data1 (numpy.ndarray) – Data values.

  • data2 (numpy.ndarray) – Data values.

  • ci (float, optional) – Confidence interval value. Must be in the [0, 1] range.

  • salient_data (dict, optional) – Salient data values. Must be in the same format as data1. Contains: - - - …

  • figsize (tuple, optional) – Figure size.

Returns:

fig – Matplotlib figure.

Return type:

matplotlib.pyplot.Figure

References

[Bland86]

J. Martin Bland and Douglas G. Altman, Statistical methods for assessing agreement between two methods of clinical measurement, The Lancet 327(8476) (1986) 307-310