tedana.utils.dice

dice(arr1, arr2, axis=None)[source]

Compute Dice’s similarity index between two numpy arrays.

Arrays will be binarized before comparison.

This method was first proposed in Dice[1] and Sorensen[2].

Parameters:
  • arr1, arr2 (array_like) – Input arrays, arrays to binarize and compare.

  • axis (None or int, optional) – Axis along which the DSIs are computed. The default is to compute the DSI of the flattened arrays.

Returns:

dsi (float) – Dice-Sorenson index.

References