This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def dice(im1, im2, empty_score=1.0): | |
| """ | |
| Computes the Dice coefficient, a measure of set similarity. | |
| Parameters | |
| ---------- | |
| im1 : array-like, bool | |
| Any array of arbitrary size. If not boolean, will be converted. | |
| im2 : array-like, bool | |
| Any other array of identical size. If not boolean, will be converted. | |
| Returns |