Skip to main content

A subject-independent motor imagery classification model utilizing advanced domain adaptation techniques.

Project description

LATSS

A subject-independent motor imagery classification model utilizing advanced domain adaptation techniques.

Description

LATSS is a subject-independent motor imagery classification model that utilizes advanced domain adaptation techniques to improve the generalization of the model across subjects. The model employs latent alignment to align source domain data to a target domain with the help of some labeled 'calibration' data. Tangent space mapping is then used as a feature extraction technique. The extracted features are then fed into an SVM classifier with an RBF kernel to classify the motor imagery data.

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.1.tar.gz (15.7 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.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: latss-0.1.1.tar.gz
  • Upload date:
  • Size: 15.7 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.1.tar.gz
Algorithm Hash digest
SHA256 3b57b3d8bfce5bdd2aed20de8548068cc3d30f840486581294112cf76e10c4ba
MD5 149fc7bc6da1950f48dc918117e93099
BLAKE2b-256 2d16de482aaca49c34db1a50f9eac2bc9184b223fbbdcc9bda3f204394753d70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: latss-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21345491b1dc7ef8c4d08eacb44cc3b7ef1844cfa345b6d274a5357af0faa4b1
MD5 ea992b3ee3b5d19b01432d29dbbc279c
BLAKE2b-256 cb1051555ac00816f8f8e23097fd1da43cd8fab1473f4fd37638b98e4e796fe1

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