fscore
F-Score Metrics API
This module contains additional metrics for F-Score.
Classes:
-
MultiF1Score
–A wrapper around keras.metrics.F1Score to handle multi-dimensional data.
Classes
MultiF1Score
A wrapper around keras.metrics.F1Score to handle multi-dimensional data. This class collapses down to 2D and treats last dimension as classes.
Example:
f1 = nse.metrics.MultiF1Score(average='macro')
y_true = np.array([[0, 1, 0], [1, 0, 1]])
y_pred = np.array([[0, 1, 0], [1, 0, 0]])
f1.update_state(y_true, y_pred)
print(f1.result().numpy())