Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train CNN to predict computationally expensive nightly features #13

Open
2 tasks
Mustaf2501 opened this issue Apr 17, 2024 · 0 comments
Open
2 tasks

Train CNN to predict computationally expensive nightly features #13

Mustaf2501 opened this issue Apr 17, 2024 · 0 comments

Comments

@Mustaf2501
Copy link
Collaborator

Mustaf2501 commented Apr 17, 2024

Description

We currently calculate several features from signal data on a nightly basis since these calculations are computationally expensive. If we can speed these calculations up, we can utilize these features within the live BCI system. This body of work aims to use Convolutional Neural Networks (CNNs) to learn to predict nightly feature values from signal data in order to quickly calculate these features.

We should start by predicting the live system features to understand how well CNNs are at this task. Once we've done that, we can move onto predicting the nightly features.

Primer on CNNs

https://www.youtube.com/watch?v=8iIdWHjleIs&t=0s

Signal Dataset

Since we currently don't have live rat ECoG signals to use, we can learn how effective CNNs are at predicting nightly features based on human ECoG data. This isn't exactly analogous, but it should give us an indication of how effective this ML system would be. We have ECoG data from humans playing a game:

Dataset link - https://openneuro.org/datasets/ds004770/versions/1.0.0
Dataset Google Drive Link: https://drive.google.com/file/d/1Wh8SJ1qZ3_mBZdX_Hukz04uYbYQvfXSQ/view?usp=sharing
Dataset Paper: https://assets.researchsquare.com/files/rs-3581007/v1/c27bf88d-3f89-4b8f-bf79-0fd848624f38.pdf?c=1702544255
Dataset Name: sub-01_ses-task_task-game_run-01_ieeg.edf

Nightly Features

In this section, we will list out the nightly features we want to be able to predict quickly from ECoG data. These features can be found here:

https://github.com/Metaverse-Crowdsource/EEG-Chaos-Kuramoto-Neural-Net/blob/main/Systems_and_states/Experiments.ipynb

  • 2D and 3D phase space reconstructions using delay embedding
  • Mutual information for determining optimal delay
  • False nearest neighbors for determining optimal embedding dimension
  • Cao's method for determining optimal embedding parameters
  • Katz Fractal Dimension
  • Multiscale Entropy
  • Wavelet-based Fractal Analysis and Hurst exponent estimation
  • Lyapunov Exponents
  • UMAP (Uniform Manifold Approximation and Projection) for dimensionality reduction
  • t-SNE (t-Distributed Stochastic Neighbor Embedding) for dimensionality reduction
  • Hamiltonian Matrix Construction using energy features, temporal symmetry, and channel correlations
  • Quantum-inspired metrics:
  • Spectral gap
  • Localization length
  • Purity
  • von Neumann entropy
  • Linear entropy
  • Participation ratio
  • Fidelity
  • Concurrence
  • Power Spectral Density (PSD) using Welch's method and FFT
  • Harmonics Detection in PSD
  • Harmonics Detection using Lyapunov Exponents
  • Amari Neural Field Equation analysis:
  • Spectrum analysis
  • Response surface visualization
  • Weighted Undirected Network measures:
  • Clustering coefficient
  • Modularity
  • Small-worldness (sigma and omega)
  • Global efficiency
  • Assortativity
  • Riemannian geometry analysis:
  • Covariance matrix computation
  • Riemannian mean of covariance matrices

https://github.com/Metaverse-Crowdsource/EEG-Chaos-Kuramoto-Neural-Net/blob/main/Spectral%20Analysis/Spectral%20Analysis.ipynb

  • Welch's Power Spectral Density (PSD)
  • Fast Fourier Transform (FFT) Power Spectral Density (PSD)
  • Lomb-Scargle Periodogram
  • Wavelet Transform Power Spectral Density (PSD)
  • Autocorrelation Function (ACF)
  • Partial Autocorrelation Function (PACF)
  • Akaike Information Criterion (AIC) from AutoRegressive (AR) models
  • Bayesian Information Criterion (BIC) from AutoRegressive (AR) models
  • AutoRegressive (AR) model predicted values
  • Band Powers (Delta, Theta, Alpha, Beta, Gamma)
  • Short-Time Fourier Transform (STFT)
  • Spectral Entropy
  • Coherence using Continuous Wavelet Transform (CWT)
  • Spectral Centroids
  • Frequency of Maximum Power
  • Spectral Edge Density
  • Continuous Wavelet Transform (CWT) Coefficients

https://github.com/Metaverse-Crowdsource/EEG-Chaos-Kuramoto-Neural-Net/blob/main/Transfer%20Entropy/Transfer%20Entropy.ipynb

  • Transfer Entropy between hemispheres (left and right)
  • Transfer Entropy sequence for sliding windows between hemispheres
  • CNN input features from Transfer Entropy sequence between hemispheres
  • RNN input features from Transfer Entropy sequence between hemispheres
  • Transfer Entropy between hemispherical channel pairs
  • Transfer Entropy between brain regions (frontal, temporal, parietal, occipital)
  • Full granularity Transfer Entropy between all channel pairs

Live System Features

These features are fast to calculate and are thus included in the live BCI system. Try to predict these first using CNNs to understand how effective CNNs are. You can find the features listed here:

Peaks:

  • peak_height
  • peak_counts
  • average peak heights
  • average distances
  • average prominences
  • variance
  • std_dev
  • RMS
  • frequencies
  • PSDs
  • delta_band_power
  • theta_band_power
  • alpha_band_power
  • beta_band_power
  • spectral entropy
  • fft_results
  • magnitudes
  • centroids
  • spectral_edge_densities
  • positive frequencies
  • positive fft results
  • cumulative sums
  • total powers
  • thresholds
  • phases for each signals
  • pairwise phase locking values
  • higuchi_fractal_dimension
  • zero_crossing_rate
  • IMFS
  • signal shapes
  • average signal shapes
  • warping factors
  • evolution_rate
  • analytic signals
  • envelops
  • derivatives

Task List

  • Train CNN on computationally cheap live system features
  • Train CNN on computationally expensive nightly features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants