sefef


Namesefef JSON
Version 2.1.4 PyPI version JSON
download
home_pageNone
SummarySeFEF: Seizure Forecast Evaluation Framework
upload_time2025-02-02 15:17:26
maintainerNone
docs_urlNone
authorAna Sofia Carmo
requires_pythonNone
licenseBSD 3-clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Welcome to ``SeFEF``
======================

.. image:: https://raw.githubusercontent.com/anascacais/sefef/main/docs/logo/sefef-logo.png
    :align: center
    :alt: SeFEF logo

|

``SeFEF`` is a Seizure Forecast Evaluation Framework written in Python.
The framework standardizes the development, evaluation, and reporting of individualized algorithms for seizure likelihood forecast. 
``SeFEF`` aims to decrease development time and minimize implementation errors by automating key procedures within data preparation, training/testing, and computation of evaluation metrics. 

Highlights:
-----------

- ``evaluation`` module: implements time series cross-validation.
- ``labeling`` module: automatically labels samples according to the desired pre-ictal duration and prediction latency.
- ``postprocessing`` module: processes individual predicted probabilities into a unified forecast according to the desired forecast horizon.
- ``scoring`` module: computes both deterministic and probabilistic metrics according to the horizon of the forecast.  



Installation
------------

Installation can be easily done with ``pip``:

.. code:: bash

    $ pip install sefef

Simple Example
--------------

The code below loads the metadata from an existing dataset from the ``examples`` folder, create a ``Dataset`` instance, and creates an adequate split for a time series cross-validation.

.. code:: python

    import json
    import pandas as pd
    from sefef import evaluation

    # read example files
    files_metadata = pd.read_csv('examples/files_metadata.csv')
    with open('examples/sz_onsets.txt', 'r') as f:
         sz_onsets = json.load(f)
   
    # create Dataset instance and perform TSCV
    dataset = evaluation.Dataset(files_metadata, sz_onsets, sampling_frequency=128)
    tscv = evaluation.TimeSeriesCV()
    tscv.split(dataset, iteratively=False, plot=True)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sefef",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Ana Sofia Carmo",
    "author_email": "anascacais@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/17/8143c12d3ee6ee8d06e79e2c78a993ac0ec2083fd0419beb4616983ef7a5/sefef-2.1.4.tar.gz",
    "platform": null,
    "description": "Welcome to ``SeFEF``\n======================\n\n.. image:: https://raw.githubusercontent.com/anascacais/sefef/main/docs/logo/sefef-logo.png\n    :align: center\n    :alt: SeFEF logo\n\n|\n\n``SeFEF`` is a Seizure Forecast Evaluation Framework written in Python.\nThe framework standardizes the development, evaluation, and reporting of individualized algorithms for seizure likelihood forecast. \n``SeFEF`` aims to decrease development time and minimize implementation errors by automating key procedures within data preparation, training/testing, and computation of evaluation metrics. \n\nHighlights:\n-----------\n\n- ``evaluation`` module: implements time series cross-validation.\n- ``labeling`` module: automatically labels samples according to the desired pre-ictal duration and prediction latency.\n- ``postprocessing`` module: processes individual predicted probabilities into a unified forecast according to the desired forecast horizon.\n- ``scoring`` module: computes both deterministic and probabilistic metrics according to the horizon of the forecast.  \n\n\n\nInstallation\n------------\n\nInstallation can be easily done with ``pip``:\n\n.. code:: bash\n\n    $ pip install sefef\n\nSimple Example\n--------------\n\nThe code below loads the metadata from an existing dataset from the ``examples`` folder, create a ``Dataset`` instance, and creates an adequate split for a time series cross-validation.\n\n.. code:: python\n\n    import json\n    import pandas as pd\n    from sefef import evaluation\n\n    # read example files\n    files_metadata = pd.read_csv('examples/files_metadata.csv')\n    with open('examples/sz_onsets.txt', 'r') as f:\n         sz_onsets = json.load(f)\n   \n    # create Dataset instance and perform TSCV\n    dataset = evaluation.Dataset(files_metadata, sz_onsets, sampling_frequency=128)\n    tscv = evaluation.TimeSeriesCV()\n    tscv.split(dataset, iteratively=False, plot=True)\n",
    "bugtrack_url": null,
    "license": "BSD 3-clause",
    "summary": "SeFEF: Seizure Forecast Evaluation Framework",
    "version": "2.1.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "270ae949b7bf04633a94603826c51143afb968ed6e5eeaaf6bf54fd2ef7f2c5e",
                "md5": "153d82785614b58b1b6de7ebe8a4adeb",
                "sha256": "597f25b4c6f9a528387b8083a2411b3adfcc6366357af07d0e193abb81e4488e"
            },
            "downloads": -1,
            "filename": "sefef-2.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "153d82785614b58b1b6de7ebe8a4adeb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23650,
            "upload_time": "2025-02-02T15:17:23",
            "upload_time_iso_8601": "2025-02-02T15:17:23.683414Z",
            "url": "https://files.pythonhosted.org/packages/27/0a/e949b7bf04633a94603826c51143afb968ed6e5eeaaf6bf54fd2ef7f2c5e/sefef-2.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6b178143c12d3ee6ee8d06e79e2c78a993ac0ec2083fd0419beb4616983ef7a5",
                "md5": "889adef00da858e75d8a3aa67ad0c8bc",
                "sha256": "58e88c4a1a07d9a6aa42f5bc58d6079e6185ece8080dafa2d88cfed157469cb7"
            },
            "downloads": -1,
            "filename": "sefef-2.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "889adef00da858e75d8a3aa67ad0c8bc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 120996,
            "upload_time": "2025-02-02T15:17:26",
            "upload_time_iso_8601": "2025-02-02T15:17:26.327190Z",
            "url": "https://files.pythonhosted.org/packages/6b/17/8143c12d3ee6ee8d06e79e2c78a993ac0ec2083fd0419beb4616983ef7a5/sefef-2.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-02 15:17:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sefef"
}
        
Elapsed time: 4.97385s