tumourkit.segmentation.evaluate.compute_f1_score_from_matrix

tumourkit.segmentation.evaluate.compute_f1_score_from_matrix(conf_mat: ndarray, cls: int) float

Computes the F1 score of a given class against the rest.

Parameters:
  • conf_mat (np.ndarray) – The confusion matrix.

  • cls (int) – The class for which to compute the F1 score.

Returns:

The F1 score of the given class against the rest.

Return type:

float