Ive had a class on Neurotech and they did not explain any of this but expected me to write a program using ICA feature selection. I found nothing usefull until this video. thank you so much
@ShawhinTalebi2 жыл бұрын
I was in a similar situation. That’s a big reason for this video. Glad it was helpful!
@golnazbaghdadi46173 ай бұрын
The best explanation of ICA that I have ever seen, thanks!
@rlee12573 жыл бұрын
Very clear, thanks! The examples with the mic and blinks were a great inclusion imo. They made ICA much easier to understand while also displaying the practical application in a fun way :)
@ShawhinTalebi3 жыл бұрын
Glad it was helpful!
@thevitorialima2 ай бұрын
Amazing explanation man, I always end up looking your videos for technical but clean explanations!!
@ShawhinTalebi2 ай бұрын
Thanks Vitoria :)
@NonstopElectroshock2 жыл бұрын
Amazing explenation! Thank you so much! You saved my butt for my exam tomorrow
@ShawhinTalebi2 жыл бұрын
Glad I could help!
@renanbarella75562 жыл бұрын
Gotcha! it was an amazing explanation about ICA! Thank you very much for that Shawhin! 🙃
@ShawhinTalebi2 жыл бұрын
Thanks, glad it made sense 😁
@raven58472 жыл бұрын
Love it! It was well explained and the example part makes the concept clearer. Thank you : )
@ShawhinTalebi2 жыл бұрын
So glad it was helpful!
@mahdieshraghi3 жыл бұрын
Thank you from Iran 🇮🇷
@ShawhinTalebi3 жыл бұрын
Happy to share!
@neurodiscussionswithpegah3 жыл бұрын
Great explanation! Thank you Shawhin!
@ShawhinTalebi3 жыл бұрын
Glad it was helpful!
@peteremmanuel85576 ай бұрын
Beautiful explanation Shaw... Thanks
@barmawn Жыл бұрын
Thank you for your useful contents shawhin🙏🏻
@ShawhinTalebi Жыл бұрын
My pleasure!
@karenfu4242 Жыл бұрын
good examples and codes for beginner like me to learn the concept of ICA!
@ShawhinTalebi Жыл бұрын
Glad it was helpful!
@woodworkingaspirations172014 күн бұрын
Back to watch again
@martonmunding86453 жыл бұрын
Great explanation, thank you! I was looking for some material to help me with an EEG blink removal problem, so it's the perfect find!
@ShawhinTalebi3 жыл бұрын
Thank you for your comment. That is great to hear. Happy to help!
@ifycadeau3 жыл бұрын
woohoo! been waiting for this one
@ShawhinTalebi3 жыл бұрын
Happy to oblige
@kaldirYT3 жыл бұрын
My birthday is now complete
@chiragpalan97802 жыл бұрын
thanks for explanation, but may I ask why we want independent components to be non-gaussian?
@ShawhinTalebi2 жыл бұрын
Hi Chirag, that's a good question. I go into a bit more detail in the blog: towardsdatascience.com/independent-component-analysis-ica-a3eba0ccec35. Briefly, however, ICA combines the non-Gaussianity of independent components assumption, with the central limit theorem to connect the measured signals (e.g. x1 and x2) to the unmeasured independent components (e.g. s1 and s2). Hope that helps! Please feel free to share any follow-up questions, I find them very helpful. Shaw
@dragoncurveenthusiast Жыл бұрын
This was super useful! Thank you!
@ShawhinTalebi Жыл бұрын
Glad it was helpful!
@Jamboreeni3 жыл бұрын
Great vid man!
@ShawhinTalebi3 жыл бұрын
Thanks Abhay! Glad it was helpful
@parinazamini20723 жыл бұрын
Thank you so much , this video is really helpful 🌷🌷
@ShawhinTalebi3 жыл бұрын
Glad it was helpful! Thanks for watching
@muzammiliqbal46203 жыл бұрын
Thank you. Very informative session.
@ShawhinTalebi3 жыл бұрын
Thank you, happy to help!
@aminsinichi3 жыл бұрын
Great job!
@ShawhinTalebi3 жыл бұрын
Thanks for the visit!
@MrSreior2 жыл бұрын
Thank you so mucj
@ShawhinTalebi2 жыл бұрын
Glad it was helpful!
@Hhushrk122 жыл бұрын
Hi, what PCA data specifically did you put into ICA? Did you take the variable loadings of each of the 21 PCs? Was that your data frame? I am trying to do this for financial data, would be awesome if you took the output of your PCA video and ran ICA on top of that
@ShawhinTalebi2 жыл бұрын
Hey, thanks for the question! The transformed EEG signals (i.e. 21 principal components) are what are fed into the ICA function. The data structure is an array where rows correspond to time points and columns to each of the principal components. That sounds like a cool idea! It should be simple to implement. If you are using sklearn, you can use a X_pca = pca.fit_transform(X) to get the transformed data, then a X_ica = ica.fit_transform(X_pca) to apply ICA to the principal components. PCA: scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA ICA: scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html Hope that helps!
@QifanWang5 ай бұрын
THX! Very clear! Could you explain SCA vs PCA? Shared component analysis or Shared variance component analysis?
@ShawhinTalebi5 ай бұрын
Great suggestion! I haven't used SCA before, but I just downloaded the paper :)
@saadawan4772 жыл бұрын
Hi, Shawhin can you please tell me that how I can made heuristic guess in case of grayscale imges? let say i get PCA_data i.e 10 Principal Components now then how many Independent Components i need, in order to construct gray level co occurance Matrix? while i am doing MR Brain images segmentation and classification in matlab. Thanking you in anticipation.
@ShawhinTalebi2 жыл бұрын
Hi Saad, thanks for the question. That sounds like an interesting project! A simple thing is to just use the explained variance from PCA (say >0.95) to determine the number of components, then keep the same component count for ICA. I'm sure there are more sophisticated tricks you can do based on the ultimate goal for the project. Hope that's helpful!
@saadawan4772 жыл бұрын
@@ShawhinTalebi Thanks for your reply. yeah i got it, i did it in the same way i.e No. of PCs= No. of ICs. Yes, it is helpful!
@alexeigilev85773 жыл бұрын
Is it possible (or does it make any sense) to apply ICA to participants ratings (behavioural data) on many variables?
@ShawhinTalebi3 жыл бұрын
Thanks for the question! Typically ICA requires time series data. If these ratings are indexed by time, ICA should work. Hope that helps!
@woodworkingaspirations172011 ай бұрын
Well explained
@ShawhinTalebi11 ай бұрын
Thanks, glad it was clear!
@reza.partovi2 жыл бұрын
It was a great video. To restore back the data, shouldn't we add the mean also? After doing the inverse pca tranformation.
@ShawhinTalebi2 жыл бұрын
Hi Reza, thanks for your comment! Yes that is a good point. In general, we also need to invert the normalization step (hidden in MATLAB's pca function) to get back to our original units. For EEG data, we may not care about this step since we are interested in signal oscillations (i.e. brain waves) rather than absolute voltage values. Thanks again, Shaw
@reza.partovi2 жыл бұрын
Thank you Shaw
@manden_fruta Жыл бұрын
Hi Shawhin, thank you for the clear explanation about ICA I tried your code without any modifications and every time I ran the script, the results are different. Like everytime the resulting signal without blink is different in shape and amplitude, is that normal? Also, when I plot the original data (64 channels) vs the resulting data_noblink, each channel is not consistent regarding its positions (like data from channel 1 (Data(:,1)) is now in Data(:,6) and so on. My question is, is there a random effect of using ICA that I didn't catch when inverse PCA transform happens? if so, can I use a seed or similar to control this randomness?
@ShawhinTalebi Жыл бұрын
Great question. The ICA implementation here introduces randomness into the code. Quickly skimming the MATLAB doc, it's not immediately obvious how one can control it, but I have provided the link below for you reference. www.mathworks.com/help/stats/rica.html#bvnjjp8-5 Hope that helps!
@manden_fruta Жыл бұрын
Thank you! @@ShawhinTalebi
@RahulSingh-up8jo Жыл бұрын
Thank you!
@ShawhinTalebi Жыл бұрын
Happy to help!
@manjukh222 жыл бұрын
How to apply PCA and ICA for cognitive radio? Spectrum sensing and channel detection.
@ShawhinTalebi2 жыл бұрын
Hi Manjunatha, Thanks for the question! I'm sorry, I've never worked with that kind of data before. However if you have a set of time series like with EEG, the code I've shared here should work. Now, whether that gives anything useful is another matter. Sorry if that wasn't helpful. Perhaps someone with more experience with cognitive radio will chime in. Shaw
@manjukh222 жыл бұрын
@@ShawhinTalebi Thanks for the reply sir. Great explanation. I will follow your instructions in the reply.
@shruthivenugopal57923 жыл бұрын
Is there any package to implement ICA in skicit -learn ?
@ShawhinTalebi3 жыл бұрын
Hi Sruthi, thank you for the comment. Yes, sklearn has an ica implementation. Here is a link to the doc: scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html
@me-ou8rf3 ай бұрын
If I have EOG channels in my EEG data which already contains Eye Artefacts better then should I remove those channels before applying ICA ?
@ShawhinTalebi3 ай бұрын
Good question. I think you can leave those in. It may even improve the results. Alternatively, you can leave it out and use it to pick out the ICs which contain blink artifacts.
@me-ou8rf3 ай бұрын
@ShawhinTalebi thanks for reply. Is using ICA really necessary ? In many MI-EEG paper, they don't seem to use ICA for their deep learning architecture. They all use BCIC-IV 2a dataset. Is it because during Motor imagery task, which involves short time like 4s , not much eye blinking going on ? Or is the convolution layer automatically take care of that ?
@silvyarahmatiaraputri51332 жыл бұрын
hi, can ICA be used on NASA IMS bearing dataset?
@ShawhinTalebi2 жыл бұрын
Hi Silvya, thanks for the question. I'm not too familiar with that dataset. However, if it is a multivariate time series dataset, ICA is typically applicable.
@ardan77793 жыл бұрын
Thanks!
@ShawhinTalebi3 жыл бұрын
Thanks for watching 😁
@JoshBugg Жыл бұрын
When you drop the blink components, are you dropping the columns or zeroing them out, as it says in the commented code?
@ShawhinTalebi Жыл бұрын
Thanks for the question. I zero them out to keep the matrix the same shape. Otherwise, there might be issues in reconstructing the signal.
@JoshBugg Жыл бұрын
@@ShawhinTalebi Thanks for clarifying!
@danielkrupah3 жыл бұрын
Please can you help me to estimate PCA for panel data using Stata. Thank you
@ShawhinTalebi3 жыл бұрын
Hi Daniel, I’m sorry I do not have experience with Stata. However, the PCA video may be helpful: kzbin.info/www/bejne/jXXNq5qkpt6tatU Hope that helps!
@sfnembedded2 жыл бұрын
You have explained it so well, thank you. May I ask? Removing blink or the other noise, Can we do it with some combination such as HPF (High Pass Filter), LPF (Low Pass Filter), and BPF (Band Pass Filter) or there's any special use for ICA or PCA? in case of filtering signal. Thank you!
@ShawhinTalebi2 жыл бұрын
Absolutely! PCA and ICA are just another set of tools for the signal processing toolbox. So they can be combined with other filtering approaches. For example, one idea is to take a signal, copy it multiple times, and apply a different filter to each copy. Now you’re set up to do a PCA or ICA or both on this set of signals. Hope that answers your question. Please let me know if I missed it.
@sfnembedded2 жыл бұрын
@@ShawhinTalebi It's clear right now. Appreciate it! Can you make a video about the theoretical way? I'm very curious about the signal analysis method
@ShawhinTalebi2 жыл бұрын
@@sfnembedded Thanks for the suggestion! I've been considering making an appendix to this series, and that sounds like a good fit for it.
@sfnembedded2 жыл бұрын
@@ShawhinTalebi Thank you. Already subscribed, can't wait for more great content
@ShawhinTalebi2 жыл бұрын
@@sfnembedded Thank you, I appreciate it!
@malcolmudeozor3264 Жыл бұрын
Hey! Great video! it seeams like your data is still autoscaled after transforming it back to its original form. Would you recommend un-Zscoring the data?
@ShawhinTalebi Жыл бұрын
If you are going to use the raw values directly then yes, but if you are going to convert into spectral bands (eg alpha, beta, etc.) then I don’t think that’s necessary.
@alihamid80853 жыл бұрын
Could you please send me a link for EEG dataset description that used in this example.
@ShawhinTalebi3 жыл бұрын
Example code and data can be found at the GitHub linked in the description. Data is from me sitting quietly with my eyes open. Hope that helps!
@tanvikapdi14223 жыл бұрын
can u pls guide how eeg can help with data related to brain disfunction
@ShawhinTalebi3 жыл бұрын
Thanks for the comment! I’m sorry that is not my area of expertise. I’m sure there is a good literature focused on that.
@bluehope4143 Жыл бұрын
Can you apply ICA for sharp spike noise removal from local field potentials?
@ShawhinTalebi Жыл бұрын
That's a good question. The blink artifacts here are sharp spikes, and ICA does a decent job at handling them. But I'm sure there are cases where this breaks down. It's definitely worth a try!
@bluehope4143 Жыл бұрын
@Shawhin Talebi I gave it a try, it removes many spikes but not all. It was still very helpful and reduces my preprocessing work. Thanks!
@ShawhinTalebi Жыл бұрын
@@bluehope4143 Good to know, thanks for reporting back :)
@PRASANTHPR-v1g Жыл бұрын
❤❤❤❤
@KongQuestCo3 жыл бұрын
I was gonna ask if they could use the eeg with their eyes closed. Then I remembered how you were getting the data lol
@ShawhinTalebi3 жыл бұрын
Yes
@עינת-ל3 жыл бұрын
Thanx
@dtr_cpg2 жыл бұрын
Cool
@pravinandhale Жыл бұрын
❤
@kumarpratap51156 ай бұрын
so ICA is used to separate the sources? and remove noise?
@ShawhinTalebi6 ай бұрын
Yes that's the idea. We separate the signal into constituent sources, some of which we can pick out as noise.
@physicswithamartya10613 жыл бұрын
Sir can you provide a pdf note regarding it...
@ShawhinTalebi3 жыл бұрын
Hi Amartya, thank you for the comment. The blog dives a bit more into the details. Hope that is helpful! Blog: towardsdatascience.com/independent-component-analysis-ica-a3eba0ccec35