Compare szCORE compliant annotations of EEG datasets of people with epilelpsy.
Project description
szcore-evaluation
Compare szCORE compliant annotations of EEG datasets of people with epilelpsy.
The package compares annotations in TSV. The annotations should be organized in a BIDS compliant manner:
BIDS_DATASET/
├── ...
├── sub-01/
│ ├── ses-01/
│ │ └── eeg/
│ │ ├── sub-01_ses-01_task-szMonitoring_run-00_events.tsv
│ │ ├── ...
│ ├── ...
├── ...
The package compares hypothesis annotations to reference annotations from two folders which follow the same structure. It provides a JSON file with the overall results as an output:
{
"sample_results": {
"sensitivity": 0.08,
"sensitivity_std": 0.04,
"precision": 0.01,
"precision_std": 0.01,
"f1": 0.02,
"f1_std": 0.01,
"fpRate": 9792.41,
"fpRate_std": 4566.68
},
"event_results": {
"sensitivity": 1.0,
"sensitivity_std": 0.0,
"precision": 0.08,
"precision_std": 0.03,
"f1": 0.16,
"f1_std": 0.04,
"fpRate": 280.55,
"fpRate_std": 0.03
}
}
The library provides a simple interface:
def evaluate_dataset(
reference: Path, hypothesis: Path, outFile: Path, avg_per_subject=True
) -> dict:
"""
Compares two sets of seizure annotations accross a full dataset.
Parameters:
reference (Path): The path to the folder containing the reference TSV files.
hypothesis (Path): The path to the folder containing the hypothesis TSV files.
outFile (Path): The path to the output JSON file where the results are saved.
avg_per_subject (bool): Whether to compute average scores per subject or
average across the full dataset.
Returns:
dict. return the evaluation result. The dictionary contains the following
keys: {'sample_results': {'sensitivity', 'precision', 'f1', 'fpRate',
'sensitivity_std', 'precision_std', 'f1_std', 'fpRate_std'},
'event_results':{...}
}
"""
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file szcore_evaluation-0.0.7.tar.gz.
File metadata
- Download URL: szcore_evaluation-0.0.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d7c2a12e7eb07126ae1361e86f499885c0069d0817ea0ac26bdc6d149904a2
|
|
| MD5 |
36d4b965cbfaf3356e95587a50e90483
|
|
| BLAKE2b-256 |
0031c34087a44b026c7d56b75dc9e05aad7d1fb726594ec87eb2e99ce3f2968a
|
Provenance
The following attestation bundles were made for szcore_evaluation-0.0.7.tar.gz:
Publisher:
python-publish.yml on esl-epfl/szcore-evaluation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
szcore_evaluation-0.0.7.tar.gz -
Subject digest:
f5d7c2a12e7eb07126ae1361e86f499885c0069d0817ea0ac26bdc6d149904a2 - Sigstore transparency entry: 173068450
- Sigstore integration time:
-
Permalink:
esl-epfl/szcore-evaluation@8edbc79c04844fb2aa56b32e63cfe6c23a240198 -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/esl-epfl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8edbc79c04844fb2aa56b32e63cfe6c23a240198 -
Trigger Event:
push
-
Statement type:
File details
Details for the file szcore_evaluation-0.0.7-py3-none-any.whl.
File metadata
- Download URL: szcore_evaluation-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c26a279c3e2ad8ed9c90e7bd1eacab392aa3780d1dd148b1ea194590a030175d
|
|
| MD5 |
b8557cb498bf8b25fcbf25d422433ccf
|
|
| BLAKE2b-256 |
ebae32adab118fce2eaa92202fed4f91b86b4c82ab5109150981a3bc8e7f3293
|
Provenance
The following attestation bundles were made for szcore_evaluation-0.0.7-py3-none-any.whl:
Publisher:
python-publish.yml on esl-epfl/szcore-evaluation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
szcore_evaluation-0.0.7-py3-none-any.whl -
Subject digest:
c26a279c3e2ad8ed9c90e7bd1eacab392aa3780d1dd148b1ea194590a030175d - Sigstore transparency entry: 173068453
- Sigstore integration time:
-
Permalink:
esl-epfl/szcore-evaluation@8edbc79c04844fb2aa56b32e63cfe6c23a240198 -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/esl-epfl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8edbc79c04844fb2aa56b32e63cfe6c23a240198 -
Trigger Event:
push
-
Statement type: