zamba.metrics¶
Functions¶
compute_species_specific_metrics(y_true: np.ndarray, y_pred: np.ndarray, labels: Optional[List[str]] = None) -> Generator[Tuple[str, int, float], None, None]
¶
Computes species-specific accuracy, F1, precision, and recall.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y_true |
np.ndarray
|
An array with shape (samples, species) where each value indicates the presence of a species in a sample. |
required |
y_pred |
np.ndarray
|
An array with shape (samples, species) where each value indicates the predicted presence of a species in a sample. |
required |
Yields:
Type | Description |
---|---|
str
|
str, int, float: The metric name, species label index, and metric value. |
Source code in /home/runner/work/zamba/zamba/zamba/metrics.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|