Giter VIP home page Giter VIP logo

tl-seediv's Introduction

LAC: Learning with Adversarial Domain Classifier to Enhance EEG Recognition Accuracy with Deep Convolution Network

This project explores the performance of various domain adaptation methods for electroencephalography (EEG) signal classification in a subject-dependent setting. The primary objective is to enhance the generalization capability of the models when dealing with unseen subjects.

Implemented Methods

We have implemented the following domain adaptation methods:

  1. Adversarial Discriminative Domain Adaptation (ADDA)
  2. Domain-Adversarial Training of Neural Networks (DANN)
  3. Meta-Learning for Domain Generalization (MLDG)
  4. MixStyle

Requirements

We construct and test the project on Windows 11 and Linux serve, the python version is 3.10. The required packages have been listed in the requirements.txt, you can use the followed commands to install them.

pip install -r requirements.txt
pip install -i https://test.pypi.org/simple/ tllib==0.4

Usage

  1. Clone the repository:
git clone https://github.com/Otsuts/TL-SEEDIV.git
cd TL-SEEDIV
  1. Install the required dependencies:
pip install -r requirements.txt
pip install -i https://test.pypi.org/simple/ tllib==0.4
  1. Run the main.py script with the desired options:
python main.py --model <model_name> --log <log_folder> --phase <phase> --learn_rate <learning_rate> --batch_size <batch_size> --num_epoch <num_epochs> --weight_decay <weight_decay> --patience <patience> --num_class <num_classes> --trade_off <trade_off> --pretrain_epoch <pretrain_epochs> --pretrain_lr <pretrain_learning_rate> --num_support <num_support> --num_domain <num_domains>

As we have use the config.yaml to save the best hyperparameters, if you want to use our saved hyperparameters. Please uncomment the followed code in the main.py

args = dict_to_namespace(config[args.model])

Then you can run the scipt simply using:

python main.py --model <model_name>

Replace <model_name> with the desired domain adaptation method (dann, adda, mixstyle, or mldg). Other options can be adjusted as needed.

  1. Run the project

The script will output the subject-dependent accuracy for the selected domain adaptation method.

You can comment/uncomment the followed code to close/open the tsne visualization

tsne_visualize(self.test_data, label_pred, f'TL Prediction Labels ({self.args.model})')

Results

Our experiments demonstrate the effectiveness of various domain adaptation methods for subject-dependent EEG signal classification. DANN outperforms all the other methods, achieving the highest classification accuracy. MLDG and MixStyle show similar performance, while ADDA achieves slightly lower accuracy.

tl-seediv's People

Contributors

otsuts avatar alr-ksim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.