# helia_edge.metrics.fscore

## F-Score Metrics API

This module contains additional metrics for F-Score.

**Classes**

| Name | Description |
| --- | --- |
| `MultiF1Score` | A wrapper around keras.metrics.F1Score to handle multi-dimensional data. |

## helia_edge.metrics.fscore.MultiF1Score

`class` · `python`

```python
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:

```python
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())
```

Source: `helia_edge/metrics/fscore.py:16`

### helia_edge.metrics.fscore.MultiF1Score.update_state

`method` · `python`

```python
update_state(y_true, y_pred, sample_weight=None)
```

Source: `helia_edge/metrics/fscore.py:34`
