Skip to main content

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

szcore_evaluation-0.0.7.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

szcore_evaluation-0.0.7-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for szcore_evaluation-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f5d7c2a12e7eb07126ae1361e86f499885c0069d0817ea0ac26bdc6d149904a2
MD5 36d4b965cbfaf3356e95587a50e90483
BLAKE2b-256 0031c34087a44b026c7d56b75dc9e05aad7d1fb726594ec87eb2e99ce3f2968a

See more details on using hashes here.

Provenance

The following attestation bundles were made for szcore_evaluation-0.0.7.tar.gz:

Publisher: python-publish.yml on esl-epfl/szcore-evaluation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file szcore_evaluation-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for szcore_evaluation-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c26a279c3e2ad8ed9c90e7bd1eacab392aa3780d1dd148b1ea194590a030175d
MD5 b8557cb498bf8b25fcbf25d422433ccf
BLAKE2b-256 ebae32adab118fce2eaa92202fed4f91b86b4c82ab5109150981a3bc8e7f3293

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page