latss


Namelatss JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryUnlocking subject-independent motor imagery decoding with label alignment.
upload_time2024-06-07 11:19:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License
keywords motor imagery eeg label alignment
VCS
bugtrack_url
requirements pyriemann scipy mne mne_icalabel onnxruntime
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LATSS

A subject-independent motor imagery classification model.

## Description

Label Alignment - Tangent Space Mapping - SVM, or LATSS for short, is a subject-independent motor imagery classification model that utilizes advanced domain adaptation techniques to improve the generalization of the model across subjects.

## Installation

```bash
$ pip install latss
```

## Usage

Training and predicting with the LATSS model is simple. Here's an example of how to use it:

```python
from latss import LATSS

# Load source data
source_data = ...

# Initialize the model
model = LATSS(source_data=source_data)

# Calibrate and train the model
# Note: calibration_data must be an annotated mne.io.Raw object
calibration_data = ...
event_id = {
            'left_hand': 1,
            'right_hand': 2,
            }
acc = model.calibrate(calibration_data, event_id=event_id)

# Predict on new data
# Note: new_data must be a mne.io.Raw object as well
new_data = ...
prediction = model.predict(new_data)
```
  
  
Source data can be any [mne.Epochs](https://mne.tools/stable/generated/mne.Epochs.html) object or a dictionary with the following structure:
```python
{
    'data': np.array,  # shape: (n_trials, n_channels, n_samples)
    'labels': np.array,  # shape: (n_events, 3)
}
```


## License

`latss` was created by Zeyad Ahmed. It is licensed under the terms
of the MIT license.

## Credits

The LATSS model was inspired by the work of He et al. [1], while introducing some key modifications and improvements.

[1] H. He and D. Wu, "Different Set Domain Adaptation for Brain-Computer Interfaces: A Label Alignment Approach," in IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 28, no. 5, pp. 1091-1108, May 2020, doi: [10.1109/TNSRE.2020.2980299](https://doi.org/10.1109/TNSRE.2020.2980299).


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "latss",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "motor imagery, EEG, label alignment",
    "author": null,
    "author_email": "Zeyad Ahmed <zeyadmansour2@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/10/610fff866ac9321f8df52c1b305f4f7e103912c13db3f416f9e77fb0fff8/latss-0.1.4.tar.gz",
    "platform": null,
    "description": "# LATSS\n\nA subject-independent motor imagery classification model.\n\n## Description\n\nLabel Alignment - Tangent Space Mapping - SVM, or LATSS for short, is a subject-independent motor imagery classification model that utilizes advanced domain adaptation techniques to improve the generalization of the model across subjects.\n\n## Installation\n\n```bash\n$ pip install latss\n```\n\n## Usage\n\nTraining and predicting with the LATSS model is simple. Here's an example of how to use it:\n\n```python\nfrom latss import LATSS\n\n# Load source data\nsource_data = ...\n\n# Initialize the model\nmodel = LATSS(source_data=source_data)\n\n# Calibrate and train the model\n# Note: calibration_data must be an annotated mne.io.Raw object\ncalibration_data = ...\nevent_id = {\n            'left_hand': 1,\n            'right_hand': 2,\n            }\nacc = model.calibrate(calibration_data, event_id=event_id)\n\n# Predict on new data\n# Note: new_data must be a mne.io.Raw object as well\nnew_data = ...\nprediction = model.predict(new_data)\n```\n  \n  \nSource data can be any [mne.Epochs](https://mne.tools/stable/generated/mne.Epochs.html) object or a dictionary with the following structure:\n```python\n{\n    'data': np.array,  # shape: (n_trials, n_channels, n_samples)\n    'labels': np.array,  # shape: (n_events, 3)\n}\n```\n\n\n## License\n\n`latss` was created by Zeyad Ahmed. It is licensed under the terms\nof the MIT license.\n\n## Credits\n\nThe LATSS model was inspired by the work of He et al. [1], while introducing some key modifications and improvements.\n\n[1] H. He and D. Wu, \"Different Set Domain Adaptation for Brain-Computer Interfaces: A Label Alignment Approach,\" in IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 28, no. 5, pp. 1091-1108, May 2020, doi: [10.1109/TNSRE.2020.2980299](https://doi.org/10.1109/TNSRE.2020.2980299).\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Unlocking subject-independent motor imagery decoding with label alignment.",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://pypi.org/project/latss/",
        "Repository": "https://github.com/zeyadmohaymen/latss.git"
    },
    "split_keywords": [
        "motor imagery",
        " eeg",
        " label alignment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b878b1e20ad31a0c931a5b741122ac39cc6e505ed3486519dd2003f1231f3f15",
                "md5": "35d6bb78675908e11831ce9b0b636d98",
                "sha256": "dba6d4e6db328a3e233b1ce0552ebcc48f1b8636c6d90e7b93f6a75b74a0b7f0"
            },
            "downloads": -1,
            "filename": "latss-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35d6bb78675908e11831ce9b0b636d98",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15110,
            "upload_time": "2024-06-07T11:19:43",
            "upload_time_iso_8601": "2024-06-07T11:19:43.320751Z",
            "url": "https://files.pythonhosted.org/packages/b8/78/b1e20ad31a0c931a5b741122ac39cc6e505ed3486519dd2003f1231f3f15/latss-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b610610fff866ac9321f8df52c1b305f4f7e103912c13db3f416f9e77fb0fff8",
                "md5": "1767e508117799209b188cead04641e7",
                "sha256": "e0085759bfad8dc714d8021ba0c73e45f5efdc830683763e6577b9ddd0b6921e"
            },
            "downloads": -1,
            "filename": "latss-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1767e508117799209b188cead04641e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15472,
            "upload_time": "2024-06-07T11:19:44",
            "upload_time_iso_8601": "2024-06-07T11:19:44.978682Z",
            "url": "https://files.pythonhosted.org/packages/b6/10/610fff866ac9321f8df52c1b305f4f7e103912c13db3f416f9e77fb0fff8/latss-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-07 11:19:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zeyadmohaymen",
    "github_project": "latss",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pyriemann",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.10.1"
                ]
            ]
        },
        {
            "name": "mne",
            "specs": []
        },
        {
            "name": "mne_icalabel",
            "specs": []
        },
        {
            "name": "onnxruntime",
            "specs": []
        }
    ],
    "lcname": "latss"
}
        
Elapsed time: 0.78453s