GithubHelp home page GithubHelp logo

jesus-333 / fbcsp-python Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 6.0 167 KB

Python implemementation of the FBCSP algorithm

License: MIT License

Python 98.63% MATLAB 1.37%
csp fbcsp eeg eeg-classification eeg-analysis machine-learning fbcsp-python

fbcsp-python's Introduction

Hi! I'm Alberto Zancanaro, a PhD student from the University of Padua

Contacs

codeSTACKr | YouTube codeSTACKr | Twitter codeSTACKr | LinkedIn codeSTACKr | Instagram codeSTACKr | codersrank


Currently working

  • ๐ŸŒฑ Artificial intelligence for greenhouses (PhD main topic)
  • ๐ŸŒ Age of Information (et similia) for network optimization

Past projects (University)

  • ๐Ÿง  Variational Autoencoder (VAE) applied to EEG classification (Post graduation research)
  • ๐Ÿง  Convolutional neural network applied to EEG classification [1] (Master's thesis)
  • ๐Ÿง  Machine learning applied to EEG classification (CSP and FBCSP algorithm) (Master's thesis)
  • ๐Ÿ‘‹ Augmented reality in unity with hand tracking (Course project)
  • ๐Ÿ‘‹ Pytorch hand tracking (Course project)
  • ๐Ÿ’Š 11 C-PIB tracer mathematical modelling (Bachelor's thesis)

Free time projects

Project's repository

๐Ÿ’ป Technology ๐Ÿš€ Projects
Python Hand Tracking PyTorch DynamicNet Python Cellular Automata Fractals CSP FBCSP VAE for EEG Google-Hash-Code-2019
C# Unity-hand-tracking Unity-Evolution-Simulator Unity3D-Solar-System Arctic-Circle-Theorem

Pubblications

Click to expand!
  • [1] A. Zancanaro, G. Cisotto, J.R.Paulo, G. Pires, and U. J. Nunes, โ€œCNN-based approaches for cross-subject classification in motor imagery:From the state-of-the-art to Dynamicnet,โ€ in 2021 IEEE Conferenceon Computational Intelligence in Bioinformatics and ComputationalBiology (CIBCB), 2021, pp. 1โ€“7
  • [2] A. Zancanaro, G. Cisotto, L. Badia, "Modeling Value of Information in Remote Sensing from Correlated Sources" in 2022 IEEE Mediterranean Communication and Computer Networking Conference (MedComNet)
  • [3] A. Zancanaro, G. Cisotto, L. Badia, "Challenges of the Age of Information Paradigm for Metrology in Cyberphysical Ecosystems" in 2022 IEEE Metrology for Living Environment (MetroLivEnv)
  • A. Zancanaro, G. Cisotto, D. Tegegn, L. Badia, S. L. Manzoni, I. Reguzzoni, E. Lotti, I. Zoppis, "Variational Autoencoder for Early Stress Detection in Smart Agriculture: A Pilot Study" in 2022 IEEE Metrology for Agriculture and Forestry
  • Yeah very short... I hope to enlarge it in the future ๐Ÿ˜‚

Stats

fbcsp-python's People

Contributors

jesus-333 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fbcsp-python's Issues

Custom Filter Bands( freqs_band) Issue with Fix

The default freqs_band argument choice FBCSP_4 is np.linspace(4, 40, 10) while I want to pass a custom one np.linspace(8, 32, 7) but your code gives a bug associated to this assertion (freqs_band == None)

Your Code

Frequencies band
         if(freqs_band == None): self.freqs = np.linspace(4, 40, 10)
         else: self.freqs =  freqs_band

My Fix

        if isinstance(freqs_band, np.ndarray):
            self.freqs = freqs_band
        elif(freqs_band == None):
            self.freqs = np.linspace(4, 40, 10)
        else:
            raise ValueError('freqs_band must be a Numpy Array')

Btw your code is really helpful in my project and luckily I found it. Thanks for making it opensource

Bug with custom classifier

If you uncomment below, and run your test_file_multi.py, you will know:
FBCSP_multi_clf = FBCSP_Multiclass(trials_dict, fs, classifier = SVC(kernel = 'rbf', probability = True), print_var = print_var)

Implementation Issue with MIBIF Feature Extraction

Given the paired nature of CSP, in the original FBCSP paper, the number of features per classifier in the overall one versus rest classifier can vary from 4 to 8 total, however, with the way the FBCSP_V4 class is set up only 8 features can be selected (based on the n_features parameter), but implementation wise this is not considered, If we run into a scenario say where we have six features selected, then an error will be thrown because of a shape mismatch between the classifier during training and when it is used for evaluation of new trials.

I have included a demonstration of this issue in my fork of your repo.

Best,
Tekin

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.