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](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.
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.0.tar.gz.
File metadata
- Download URL: latss-0.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d725b9433f56867676f1571878e30fbced4aa53628a80923dd93c25475e68ad
|
|
| MD5 |
ec2dfbbc7bf77bf50f9505495dbac7d7
|
|
| BLAKE2b-256 |
7f76f5b32d64994f37071b6bea43dd0edf010c295af71918dd240d46d3e62b5e
|
File details
Details for the file latss-0.1.0-py3-none-any.whl.
File metadata
- Download URL: latss-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a30392f3b0e088bf0cc86ec7e0540c834716d8da79804d0405b3fabe66c5147
|
|
| MD5 |
2a912a5ab77f70d1013e6b2731a06496
|
|
| BLAKE2b-256 |
1545b926a8b97c03adc1e6e9463acb21f80ec0602502adea5165c11523ec2c91
|