Posts by Tags

ASR

Threshold selection for ASR and how it can be used to denoise blink artifacts in Muse EEG

2 minute read

Published:

Some thoughts on using ASR after bandpass filtering as a potential good pipeline for a low-density EEG system like Muse (4 ch). Developed for students to quick prototype with Muse for a class I am guest lecturing for. Unlike denser systems, we cannot do ICA on Low-density systems like muse. Rejecting eye blinks and infrequent bursts by visual inspection might be challenging for long recordings. An appropriate threshold can minimize these artifacts while preserving clean signals. I cannot over-emphasis this enough. Selecting the right threshold is critical here!!! The default parameter for ASR is very conservative and removes too much data. This is variable depending on your data distribution and the nature of the study. Always check the data and perform sanity checks and do not go by default parameters.
The figure demonstraets a section of EEG during an eyes closed and eyes open condition. Here, the blinks when present are removed by ASR whereas the section during eyes closed during which there are no blinks, the data is retained. It shows how a carefully selected threshold can remove blinks while not rejecting cleaner part (section without blinks are retained).

Here it is very critical that we select the threshold well. For e.g. a conservative threshod of say 5 standard deviation distorts/ reconstructs even the cleaner part of the data

A relatively high threshold on the other hand fails to remove the noisy component as well. Finding the right balance is key. Sometimes, there would not be enough components to reconstruct corrupt PC and ASR flattens the data. Make sure to remove these segments from later stage

The default of value is never a good value. Make sure the value is ideal for your data, do empirical visual testing to select an ideal threshold for your data
**An important point to keep in mind is that ASR is based on Principal component analysis. A concern is there is 4 ch only and so 4 PCs. The reconstruction will be lossy and not ideal. Thread is not intended to say the method is error-proof, but an option to consider & to emphasize not to go with default:)

EEG

Threshold selection for ASR and how it can be used to denoise blink artifacts in Muse EEG

2 minute read

Published:

Some thoughts on using ASR after bandpass filtering as a potential good pipeline for a low-density EEG system like Muse (4 ch). Developed for students to quick prototype with Muse for a class I am guest lecturing for. Unlike denser systems, we cannot do ICA on Low-density systems like muse. Rejecting eye blinks and infrequent bursts by visual inspection might be challenging for long recordings. An appropriate threshold can minimize these artifacts while preserving clean signals. I cannot over-emphasis this enough. Selecting the right threshold is critical here!!! The default parameter for ASR is very conservative and removes too much data. This is variable depending on your data distribution and the nature of the study. Always check the data and perform sanity checks and do not go by default parameters.
The figure demonstraets a section of EEG during an eyes closed and eyes open condition. Here, the blinks when present are removed by ASR whereas the section during eyes closed during which there are no blinks, the data is retained. It shows how a carefully selected threshold can remove blinks while not rejecting cleaner part (section without blinks are retained).

Here it is very critical that we select the threshold well. For e.g. a conservative threshod of say 5 standard deviation distorts/ reconstructs even the cleaner part of the data

A relatively high threshold on the other hand fails to remove the noisy component as well. Finding the right balance is key. Sometimes, there would not be enough components to reconstruct corrupt PC and ASR flattens the data. Make sure to remove these segments from later stage

The default of value is never a good value. Make sure the value is ideal for your data, do empirical visual testing to select an ideal threshold for your data
**An important point to keep in mind is that ASR is based on Principal component analysis. A concern is there is 4 ch only and so 4 PCs. The reconstruction will be lossy and not ideal. Thread is not intended to say the method is error-proof, but an option to consider & to emphasize not to go with default:)

Which power metric to use to study the resting state data?

1 minute read

Published:

Relative power vs Absolute power vs Periodic power

EEG measures the electrical activity at a sensor relative to the reference & ground electrode. This causes issues in comparing absolute power between conditions &/participants as impedance differences can cause broadband shift in power. Relative power is often used as a substitute of absolute power as it supposedly normalizes w.r.t. the total power in the window of interest. However, using relative power to compare different conditions can cause spurious differences due to the nature of computation and this code is used to simulate a set of PSDs to evaluate when they fail and show how flattened PSD is a better alternative to quantify changes in multiple bands.

In general, relative power is better when reporting which band has the highest power difference. Comparing multiple bands can lead to spurious differences due to the nature of computation. Periodic power is a much more robust alternative to quantify multi-band differences.
If power increase in two bands equally, their relationship in relative power is preserved in these bands but the power in other bands gets reduced even though in the original signal they are the same. Periodic power captures these differences well. Using absolute power on the other hand can cause artificial differences even due to simple broadband power differences which can also be due to non-physiological origins such as impedance differences. Either relative power or parameterized PSD helps with it.


If the power increase is small and limited to only one band, the differences are not distorted by neither relative power nor periodic power



However, the same band power if increased more, after a point it starts distorting the rest of the PSD and the relationship will be altered. As can be seen, the rest of the band power gets artificially increased and can lead to spurious reporting.


When multiple bands increase but one (theta) is much bigger than the other (alpha), not even the increase in alpha power will be represented correctly (the relationship is flipped).


FOOOF

Which power metric to use to study the resting state data?

1 minute read

Published:

Relative power vs Absolute power vs Periodic power

EEG measures the electrical activity at a sensor relative to the reference & ground electrode. This causes issues in comparing absolute power between conditions &/participants as impedance differences can cause broadband shift in power. Relative power is often used as a substitute of absolute power as it supposedly normalizes w.r.t. the total power in the window of interest. However, using relative power to compare different conditions can cause spurious differences due to the nature of computation and this code is used to simulate a set of PSDs to evaluate when they fail and show how flattened PSD is a better alternative to quantify changes in multiple bands.

In general, relative power is better when reporting which band has the highest power difference. Comparing multiple bands can lead to spurious differences due to the nature of computation. Periodic power is a much more robust alternative to quantify multi-band differences.
If power increase in two bands equally, their relationship in relative power is preserved in these bands but the power in other bands gets reduced even though in the original signal they are the same. Periodic power captures these differences well. Using absolute power on the other hand can cause artificial differences even due to simple broadband power differences which can also be due to non-physiological origins such as impedance differences. Either relative power or parameterized PSD helps with it.


If the power increase is small and limited to only one band, the differences are not distorted by neither relative power nor periodic power



However, the same band power if increased more, after a point it starts distorting the rest of the PSD and the relationship will be altered. As can be seen, the rest of the band power gets artificially increased and can lead to spurious reporting.


When multiple bands increase but one (theta) is much bigger than the other (alpha), not even the increase in alpha power will be represented correctly (the relationship is flipped).


PSD

Which power metric to use to study the resting state data?

1 minute read

Published:

Relative power vs Absolute power vs Periodic power

EEG measures the electrical activity at a sensor relative to the reference & ground electrode. This causes issues in comparing absolute power between conditions &/participants as impedance differences can cause broadband shift in power. Relative power is often used as a substitute of absolute power as it supposedly normalizes w.r.t. the total power in the window of interest. However, using relative power to compare different conditions can cause spurious differences due to the nature of computation and this code is used to simulate a set of PSDs to evaluate when they fail and show how flattened PSD is a better alternative to quantify changes in multiple bands.

In general, relative power is better when reporting which band has the highest power difference. Comparing multiple bands can lead to spurious differences due to the nature of computation. Periodic power is a much more robust alternative to quantify multi-band differences.
If power increase in two bands equally, their relationship in relative power is preserved in these bands but the power in other bands gets reduced even though in the original signal they are the same. Periodic power captures these differences well. Using absolute power on the other hand can cause artificial differences even due to simple broadband power differences which can also be due to non-physiological origins such as impedance differences. Either relative power or parameterized PSD helps with it.


If the power increase is small and limited to only one band, the differences are not distorted by neither relative power nor periodic power



However, the same band power if increased more, after a point it starts distorting the rest of the PSD and the relationship will be altered. As can be seen, the rest of the band power gets artificially increased and can lead to spurious reporting.


When multiple bands increase but one (theta) is much bigger than the other (alpha), not even the increase in alpha power will be represented correctly (the relationship is flipped).


Testing

Weekend random thoughts

1 minute read

Published:

Weekend random thoughts on practices/views I wished we emphasized more as a community. Sharing in case someone benefits
1) Passion is critical in life as it makes the journey fun, but realize that your passion is also limited to things you are exposed to. So it is ok for it to evolve with time. Explore many things early in your career & let your passion drive the journey
2) Exposure is key & plays a huge part in you succeeding at things. If you are first in your family at doing something, it will be harder for you. You might not have the right contact or info at the right time. Your journey is unique, so work on that. Dont be disheartened by someone else's success
3) Normalize failures & encourage growth from them. Realize that the faster you fail at something, the quicker you will learn to master that situation. Let's strive to develop an environment that allows people to become vulnerable & face their fears
4) There will always be people who are better than you & that's ok. Know that it is a process, & have a larger vision. At each moment, take the next step in the direction that gets you closer to realizing it & enjoy the journey
5) Schools shifts their focus from training us to be better test-takers to creating an environment that promotes us to be curious & collaborative

debug

Weekend random thoughts

1 minute read

Published:

Weekend random thoughts on practices/views I wished we emphasized more as a community. Sharing in case someone benefits
1) Passion is critical in life as it makes the journey fun, but realize that your passion is also limited to things you are exposed to. So it is ok for it to evolve with time. Explore many things early in your career & let your passion drive the journey
2) Exposure is key & plays a huge part in you succeeding at things. If you are first in your family at doing something, it will be harder for you. You might not have the right contact or info at the right time. Your journey is unique, so work on that. Dont be disheartened by someone else's success
3) Normalize failures & encourage growth from them. Realize that the faster you fail at something, the quicker you will learn to master that situation. Let's strive to develop an environment that allows people to become vulnerable & face their fears
4) There will always be people who are better than you & that's ok. Know that it is a process, & have a larger vision. At each moment, take the next step in the direction that gets you closer to realizing it & enjoy the journey
5) Schools shifts their focus from training us to be better test-takers to creating an environment that promotes us to be curious & collaborative

denoising

Threshold selection for ASR and how it can be used to denoise blink artifacts in Muse EEG

2 minute read

Published:

Some thoughts on using ASR after bandpass filtering as a potential good pipeline for a low-density EEG system like Muse (4 ch). Developed for students to quick prototype with Muse for a class I am guest lecturing for. Unlike denser systems, we cannot do ICA on Low-density systems like muse. Rejecting eye blinks and infrequent bursts by visual inspection might be challenging for long recordings. An appropriate threshold can minimize these artifacts while preserving clean signals. I cannot over-emphasis this enough. Selecting the right threshold is critical here!!! The default parameter for ASR is very conservative and removes too much data. This is variable depending on your data distribution and the nature of the study. Always check the data and perform sanity checks and do not go by default parameters.
The figure demonstraets a section of EEG during an eyes closed and eyes open condition. Here, the blinks when present are removed by ASR whereas the section during eyes closed during which there are no blinks, the data is retained. It shows how a carefully selected threshold can remove blinks while not rejecting cleaner part (section without blinks are retained).

Here it is very critical that we select the threshold well. For e.g. a conservative threshod of say 5 standard deviation distorts/ reconstructs even the cleaner part of the data

A relatively high threshold on the other hand fails to remove the noisy component as well. Finding the right balance is key. Sometimes, there would not be enough components to reconstruct corrupt PC and ASR flattens the data. Make sure to remove these segments from later stage

The default of value is never a good value. Make sure the value is ideal for your data, do empirical visual testing to select an ideal threshold for your data
**An important point to keep in mind is that ASR is based on Principal component analysis. A concern is there is 4 ch only and so 4 PCs. The reconstruction will be lossy and not ideal. Thread is not intended to say the method is error-proof, but an option to consider & to emphasize not to go with default:)