Skip to content

Commit 8819f71

Browse files
committed
Robust estimation
1 parent a522cf8 commit 8819f71

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-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.5"
3+
version = "0.0.6"
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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,14 @@ def evaluate_dataset(
9797
hyp = Annotation(np.zeros_like(ref.mask), ref.fs)
9898

9999
# Compute evaluation
100-
sample_score = scoring.SampleScoring(ref, hyp)
101-
event_score = scoring.EventScoring(ref, hyp)
100+
try:
101+
sample_score = scoring.SampleScoring(ref, hyp)
102+
event_score = scoring.EventScoring(ref, hyp)
103+
except ValueError as e:
104+
print(f"Error in {ref_tsv}: {e}")
105+
hyp = Annotation(np.zeros_like(ref.mask), ref.fs)
106+
sample_score = scoring.SampleScoring(ref, hyp)
107+
event_score = scoring.EventScoring(ref, hyp)
102108

103109
# Store results
104110
sample_results[subject.name] += Result(sample_score)

0 commit comments

Comments
 (0)