class
MultiF1Score
PythonA wrapper around keras.metrics.F1Score to handle multi-dimensional data.
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:
import helia_edge as helia
f1 = helia.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())method
update_state
Pythonupdate_state(y_true, y_pred, sample_weight=None)