Skip to content

Commit c41640b

Browse files
committed
Deal with NaN values
1 parent 7adc360 commit c41640b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "szcore-evaluation"
3-
version = "0.0.3"
3+
version = "0.0.4"
44
description = "Compare szCORE compliant annotations of EEG datasets of people with epilelpsy."
55
authors = [
66
{ name = "Jonathan Dan", email = "jonathan.dan@epfl.ch" }

src/szcore_evaluation/evaluate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ def evaluate_dataset(
116116
(aggregated_sample_results, aggregated_event_results),
117117
):
118118
for metric in ["sensitivity", "precision", "f1", "fpRate"]:
119-
aggregated_result[metric] = np.mean(
119+
aggregated_result[metric] = np.nanmean(
120120
[getattr(x, metric) for x in result_builder.values()]
121121
)
122-
aggregated_result[f"{metric}_std"] = np.std(
122+
aggregated_result[f"{metric}_std"] = np.nanstd(
123123
[getattr(x, metric) for x in result_builder.values()]
124124
)
125125
else:

0 commit comments

Comments
 (0)