Skip to main content

Unlocking subject-independent motor imagery decoding with label alignment.

Project description

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

$ pip install latss

Usage

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

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 object or a dictionary with the following structure:

{
    '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.

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

latss-0.1.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

latss-0.1.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file latss-0.1.3.tar.gz.

File metadata

  • Download URL: latss-0.1.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for latss-0.1.3.tar.gz
Algorithm Hash digest
SHA256 484500ada7839ae99e923c2f5c149d2bbeb2ebf94c42ac2b721e421ffa7f4bfb
MD5 85d44b85dc758bee3e20049b2090582b
BLAKE2b-256 28dad98da98ca1a21aaf0ce55ab5035ae250dcfa5f5df52db37a1d86d14cc17b

See more details on using hashes here.

File details

Details for the file latss-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: latss-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for latss-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e639d577d567a73947a8a2db7b818868db3efa7f7e1da055995f13551c63dc27
MD5 4d4f2286477fa52337e6f7a676572c63
BLAKE2b-256 d92691e06cf6a399a817ffba6e92c3f9f4a63c6e09f7bf9388e313a202f02dd6

See more details on using hashes here.

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