langtest.utils.util_metrics.simple_multilabel_binarizer#

simple_multilabel_binarizer(y_true, y_pred)#

A simple implementation of a multilabel binarizer for y_true and y_pred.

Parameters:
  • y_true (list of lists or sets) – Actual labels for the data.

  • y_pred (list of lists or sets) – Predicted labels for the data.

Returns:

Binary matrix of true labels. binarized_y_pred (list of lists): Binary matrix of predicted labels. classes (list): List of all unique classes (labels).

Return type:

binarized_y_true (list of lists)