fuzzyclust.image.match_labels#

fuzzyclust.image.match_labels(y_true, y_pred)[source]#

Best one-to-one mapping of predicted labels onto true labels (Hungarian algorithm).

Parameters:
y_true, y_predarray_like

Label arrays of the same shape (label images are flattened).

Returns:
mappingndarray of shape (n_pred_labels,)

mapping[p] is the true label assigned to predicted label p (-1 for a predicted label without partner when there are more predicted than true labels).

Examples using fuzzyclust.image.match_labels#

Image segmentation under noise: six spatially constrained FCM variants

Image segmentation under noise: six spatially constrained FCM variants

Spatial FCM: the neighborhood weight and the window size

Spatial FCM: the neighborhood weight and the window size