Skip to main content

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':{...}
                 }
    """

Metadata

Release files for szcore-evaluation 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for szcore-evaluation 0.0.7
File Size Uploaded
szcore_evaluation-0.0.7.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for szcore-evaluation 0.0.7
File Interpreter ABI Platform
szcore_evaluation-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / szcore_evaluation-0.0.7.tar.gz

Download URL szcore_evaluation-0.0.7.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f5d7c2a12e7eb07126ae1361e86f499885c0069d0817ea0ac26bdc6d149904a2
BLAKE2b-256 checksum
How to use checksums
0031c34087a44b026c7d56b75dc9e05aad7d1fb726594ec87eb2e99ce3f2968a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2025.

Transparency log

Release files / szcore_evaluation-0.0.7-py3-none-any.whl

Download URL szcore_evaluation-0.0.7-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c26a279c3e2ad8ed9c90e7bd1eacab392aa3780d1dd148b1ea194590a030175d
BLAKE2b-256 checksum
How to use checksums
ebae32adab118fce2eaa92202fed4f91b86b4c82ab5109150981a3bc8e7f3293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page