dice
Dice
¶
Bases: Trace
Dice score for binary classification between y_true and y_predicted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
true_key |
str
|
The key of the ground truth mask. |
required |
pred_key |
str
|
The key of the prediction values. |
required |
threshold |
float
|
The threshold for binarizing the prediction. |
0.5
|
mode |
Union[None, str, Iterable[str]]
|
What mode(s) to execute this Trace in. For example, "train", "eval", "test", or "infer". To execute regardless of mode, pass None. To execute in all modes except for a particular one, you can pass an argument like "!infer" or "!train". |
('eval', 'test')
|
ds_id |
Union[None, str, Iterable[str]]
|
What dataset id(s) to execute this Trace in. To execute regardless of ds_id, pass None. To execute in all ds_ids except for a particular one, you can pass an argument like "!ds1". |
None
|
output_name |
str
|
What to call the output from this trace (for example in the logger output). |
'Dice'
|
per_ds |
bool
|
Whether to automatically compute this metric individually for every ds_id it runs on, in addition to
computing an aggregate across all ds_ids on which it runs. This is automatically False if |
True
|