Giter Club home page Giter Club logo

channel-attention's People

Contributors

martinwimpff avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

channel-attention's Issues

Question about data preprocess(standard scale)

hi @martinwimpff , thank you for your work and code.
While studying your and others models, I noticed the way of preprocessing datasets (StandardScaler method):

def _z_scale(X, X_test):
for ch_idx in range(X.shape[1]):
sc = StandardScaler()
X[:, ch_idx, :] = sc.fit_transform(X[:, ch_idx, :])
X_test[:, ch_idx, :] = sc.transform(X_test[:, ch_idx, :])
return X, X_test

also you can find this scale method in other models:

ATCNet:
https://github.com/Altaheri/EEG-ATCNet/blob/12a4a53c3262a899b3e6b5856d5a9ef9eac6282b/preprocess.py#L128-L136

TCNet:
https://github.com/iis-eth-zurich/eeg-tcnet/blob/363c7e52d19285b0bac9a8846bbdbd6aac5aa851/sample_train.py#L50-L54

From my understanding, this method(StandardScaler: Doc) normalizes the columns of a 2D matrix, it centering and scaling happen independently on each feature by computing the relevant statistics on the samples in the training set.

But for EEG dataset (shape: [trials, times] for each channel), it calculates the mean and std of all signal of trials at time sample t and standardizes it. However, this will change the time sequence of one trial , and maybe loss of time domain information?(because this changes the signal at t only according other trials).

So I can not understand this standard method, because the EEG time sequence is not like the multi-channel features.

Thank you again.๐Ÿ˜Š

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.