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.fit(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file latss-0.1.5.tar.gz.
File metadata
- Download URL: latss-0.1.5.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a780f15fa75eadb0c59f44d029f99c6b61cdacac05b77f1e4e6ddf3ca381e6
|
|
| MD5 |
3d5f4217c1286c1ac3e2620d1c263574
|
|
| BLAKE2b-256 |
57d13782ea7eb2d1e81fd2c8ccc112319eb4a45b5c5b82d90616c3c9c610f3d2
|
File details
Details for the file latss-0.1.5-py3-none-any.whl.
File metadata
- Download URL: latss-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
904990bc53fa86f6ac1e7d242d5237ed0a06375fc20d4e27c1076dcfaa13b646
|
|
| MD5 |
53fa8bf2d7842f1a1d90fa6880062065
|
|
| BLAKE2b-256 |
fc336a7927e0a96a41bce610c35b3e2fc37ed8c797d8912e862b79c2ce20cb7a
|