A Qualitative Comparison of the Fast Fourier Transform and the Morlet Wavelet Transform for Potential Depression Diagnosis

Student: Eliana Du
Table: BEHAV1101
Experimentation location: Home
Regulated Research (Form 1c): No
Project continuation (Form 7): No

Display board image not available

Abstract:

Bibliography/Citations:

1 Depressive disorder (depression) (2023) World Health Organization. Available at: https://www.who.int/news-room/fact-sheets/detail/depression (Accessed: 14 August 2023 

2 The state of Mental Health in America (no date) Mental Health America. Available at: https://mhanational.org/issues/state-mental-health-america (Accessed: 14 August 2023).

3 Depression (major depressive disorder) (2022) Mayo Clinic. Available at: https://www.mayoclinic.org/diseases-conditions/depression/diagnosis-treatment/drc-20356013 (Accessed: 15 August 2023)

4 Amjed S. Al-Fahoum, Ausilah A. Al-Fraihat, "Methods of EEG Signal Features Extraction Using Linear Analysis in Frequency and Time-Frequency Domains", International Scholarly Research Notices, vol. 2014, Article ID 730218, 7 pages, 2014. https://doi.org/10.1155/2014/730218 (Accessed: 30 August 2023)

5 Mohammadi, M., Al-Azab, F., Raahemi, B. et al. Data mining EEG signals in depression for their diagnostic value. BMC Med Inform Decis Mak 15, 108 (2015). https://doi.org/10.1186/s12911-015-0227-6

6 A. Elfaki et al., "Using the Short-Time Fourier Transform and ResNet to Diagnose Depression from Speech Data," 2021 IEEE International Conference on Computing (ICOCO), Kuala Lumpur, Malaysia, 2021, pp. 372-376, doi: 10.1109/ICOCO53166.2021.9673562.

7 J.F.James, A Student’s Guide to Fourier Transforms, 3rd ed. (Cambridge University Press, Cambridge, 2011)

8 Talebi, S. (2022a) Fourier vs. wavelet transform: What’s the difference?, Built In. Available at: https://builtin.com/data-science/wavelet-transform (Accessed: 17 August 2023).  

9 Mike x Cohen (2019) Origin, significance, and interpretation of EEG, YouTube. Available at: https://youtu.be/Bmt89hHyxuM?si=Qap8qf99-FOVceIu (Accessed: 14 August 2023). 

10 Newson JJ and Thiagarajan TC (2019) EEG Frequency Bands in Psychiatric Disorders: A Review of Resting State Studies. Front. Hum. Neurosci. 12:521. doi: 10.3389/fnhum.2018.00521

11 Wang, R. (2023) 5 basics of EEG 101: Data Collection, Processing & Analysis, iMotions. Available at: https://imotions.com/blog/learning/best-practice/5-basics-eeg-data-processing/ (Accessed: 31 August 2023). 

12 DSM-5 fact sheets (no date) Psychiatry.org - DSM-5 Fact Sheets. Available at: https://www.psychiatry.org/psychiatrists/practice/dsm/educational-resources/dsm-5-fact-sheets (Accessed: 30 August 2023). 

13 Babayan, A., Erbey, M., Kumral, D. et al. A mind-brain-body dataset of MRI, EEG, cognition, emotion, and peripheral physiology in young and old adults. Sci Data 6, 180308 (2019). https://doi.org/10.1038/sdata.2018.308

14 Newson, J. J., & Thiagarajan, T. C. (2019). EEG Frequency Bands in Psychiatric Disorders: A Review of Resting State Studies. Frontiers in human neuroscience, 12, 521. https://doi.org/10.3389/fnhum.2018.00521

15 Nystrom, C., Matousek, M. & Hallstrom, T. Relationships between EEG and clinical characteristics in major depressive disorder. Acta Psychiatr. Scand. https://doi.org/10.1111/j.1600-0447.1986.tb02700.x (1986).

16 Prinz, P. N., & Vitiello, M. V. (1989). Dominant occipital (alpha) rhythm frequency in early stage Alzheimer's disease and depression. Electroencephalography and clinical neurophysiology, 73(5), 427–432. https://doi.org/10.1016/0013-4694(89)90092-8

17 Baskaran, A., Milev, R. & McIntyre, R. S. The neurobiology of the EEG biomarker as a predictor of treatment response in depression. Neuropharmacology https://doi.org/10.1016/j.neuropharm.2012.04.021 (2012).

18 Pizzagalli, D. A., Peccoralo, L. A., Davidson, R. J. & Cohen, J. D. Resting anterior cingulate activity and abnormal responses to errors in subjects with elevated depressive symptoms: a 128-channel study. Human Brain Map. https://doi.org/10.1002/hbm.20172 (2006).

19 Akdemir Akar, S., Kara, S., Agambayev, S. & bilgic, vedat Nonlinear analysis of EEG in major depression with fractal dimensions. Conf. Proc. IEEE Eng. Med. Biol. Soc. 2015, 7410–7413 (2015).


Additional Project Information

Project website: -- No project website --
Presentation files:
Additional Resources: -- No resources provided --
Project files:
Project files
 

Research Plan:

Research Questions:

1) The Fourier transform is more commonly used, and is strong at analyzing periodic, consistent data, which aligns with our use of continuous, resting-state data. However, the continuous wavelet transform is strong at analyzing complex data, which aligns with our use of EEG data. How will these two aspects interact in our data analysis? Will the continuous wavelet transform ultimately be stronger, as I predict?

2) How will the topological map of the brain reflect the existence of a depressive disorder? In what frequency bands will the Fourier transform be stronger, or will the wavelet transform be stronger? How will these differences be resolved in the final analysis?

3) How can the wavelet transform and the Fourier transform be adjusted to output more comparable types of data?

 

 

Procedures: 

1) Use de-identified, publicly available EEG data describing at least one patient with Major Depressive Disorder.

 

Dataset used: Babayan, A., Erbey, M., Kumral, D. et al. A mind-brain-

body dataset of MRI, EEG, cognition, emotion, and

peripheral physiology in young and old adults. Sci Data

6, 180308 (2019).

https://doi.org/10.1038/sdata.2018.308

 

To produce an overall topographic map with both transforms:

3) Through the MATLAB programming language and the FieldTrip toolbox, use the fast Fourier transform to transform the EEG data to the frequency domain. (See GitHub link below for explicit code and code comments)

4) Noting the GitHub link mentioned in 3), calculate the mean power spectrum of the Fourier-transformed data across all electrode channels. Then, use the FieldTrip toolboxes functions to output a topographic map of the brain across all channels.

5) Similarly, use the continuous wavelet transform with the Morelet wavelet to transform the EEG data to the time-frequency domain. Ultimately, output a topographic map of the brain across all channels, as above.

 

To produce a topographic map, considering a specific frequency range and with a normalized CWT output:

6) For both transforms: After defining a command to calculate the average power spectrum, as in step 4), define the frequency band of interest (e.g. the alpha band, which has been historically determined to be 8 to 13 Hz) and calculate the average power within the chosen frequency band for each channel. Then, output a topographic map of the brain across the chosen frequency band.

7) For the wavelet transform: After performing the continuous wavelet transform, define the frequency values corresponding to scale, in order to make the two transforms’ outputs more comparable. Also, right before plotting the topographic map, normalize the power values.

8) Steps 6) and 7) should be repeated for the delta (0.5 to 4 Hz), theta (4 to 8 Hz), alpha (8 to 13 Hz), beta (13 to 30 Hz), and gamma (above 30 Hz) bands.

 

Comparison of topographic maps: 

9) Compare the overall topographic maps for both transforms, then compare them within each channel. Qualitatively assess the transforms for the ways in which they represent the following markers of depression:

- higher delta power in frontal regions

- higher theta power in frontal regions

- greater alpha asymmetry and higher alpha power in occipital regions

- an overall increase in absolute beta power

- reduced gamma power in the anterior cingulate cortex and increased resting complexity of gamma signaling in the frontal and parietal cortex

 

 

Risk and Safety: Though my data will describe human subjects, they will be de-identified to me.

Questions and Answers

1. What was the major objective of your project and what was your plan to achieve it? 

 

The major objective of my project was to determine which commonly used signal analysis method, between the fast Fourier transform and the continuous wavelet transform, was superior in detecting the presence of Major Depressive Disorder. My plan was to use both transforms to analyze a publicly available EEG dataset of a patient with Major Depressive Disorder and ultimately output a resultant topographic map of the patient’s brain for each transform. Then, I would assess each topographic map for the strength with which it presented depression biomarkers. The topographic map that confirmed the patient’s depression more strongly would correlate to the better analysis method for this purpose.

 

       a. Was that goal the result of any specific situation, experience, or problem you encountered?  

 

This goal was a result of a lifelong awareness of mental health issues in my community, especially among close friends. After I began brainstorming ideas for my research with mental health on my mind, I remembered a friend who told me that they purposely minimized the extent of their symptoms when filling out the diagnostic surveys doctors use to diagnose depression. They did so because their parents were uncomfortable with the stigma of mental health issues. I was concerned that there were others who also, by virtue of this somewhat subjective diagnostic process, were not getting the help they needed. As such, I began to look into the surprisingly sparse field of quantitative depression diagnosis. I was intrigued by the analysis of EEG data, which is a rich, complex form of neurological data, and how Fourier transforms, which I’d been discussing with my mentor, could apply in the context of depression diagnosis.

 

       b. Were you trying to solve a problem, answer a question, or test a hypothesis?

 

While I did not design my research to solve the broader problem I was concerned in, which was quantitative depression diagnosis, I hoped that the question I answered — what signal analysis method is optimal for depression diagnosis? — was a step in the direction of a general solution or invention.

 

2. What were the major tasks you had to perform in order to complete your project?

 

- I read through existing literature, conjectured a hypothesis, and designed the experiment

- I learned the necessary MATLAB programming language in just a few weeks. Most importantly, I learned how to pre-process/analyze EEG data and output topographic plots in MATLAB using both types of transforms with the FieldTrip toolbox

- I learned significant non-Fourier transform background knowledge (e.g. the nature of EEG data collection and analysis, what wavelet transforms are and how they mathematically and practically differ from Fourier transforms)

- My data analysis and the conclusions I drew were also drawn completely on my own (with the help of pre-existing literature, of course)

-I wrote my whole paper and created most of my diagrams on my own

 

       a. For teams, describe what each member worked on.

 

 N/A

 

 

3. What is new or novel about your project?

 

The concept and goal of my project are novel. Quantitative depression diagnosis in general is a surprisingly under-researched aspect of neurological data. My methods, too, are novel in the specific way I implement them.

 

       a. Is there some aspect of your project's objective, or how you achieved it that you haven't done before?

 

Yes, there are many aspects of this project that are new to me, as this my first formal research project. As I’ve articulated in other parts of the answer section, the code and processes by which I reached my conclusion were all novel to me; I had to learn them over the course of my research. Although I had preexisting knowledge of Fourier transforms through conversation with my mentor, I had never used them to analyze EEG data. I also had to apply wavelet transforms, another novel aspect, among others.

 

       b. Is your project's objective, or the way you implemented it, different from anything you have seen?

 

Yes! I haven’t seen any studies focusing on the analysis of EEG data with respect to quantitative depression diagnosis. I also have not seen any studies that have used topological maps of the brain as a parameter by which to measure the effectiveness of a signal processing technique for neurological data.

 

       c. If you believe your work to be unique in some way, what research have you done to confirm that it is?

 

I’ve done an in-depth literature review on the above points. I’ve also discussed my research informally with parents’ friends who are medical professionals in the neuroscience field. 

 

4. What was the most challenging part of completing your project?

 

My biggest challenge in carrying out my procedure was in learning to write the necessary code to take in EEG data and output topological maps with both transforms. Though I’d hoped for my mentor’s familiarity with the MATLAB language in his field to assist me, he unfortunately could not aid with my desired analysis, as EEG data was very different from what he worked with. Ultimately, though, it makes me proud to look back on my code, knowing the many hours of hard work those lines hold.

 

      a. What problems did you encounter, and how did you overcome them?

 

- I struggled to choose how I should analyze the EEG data, especially given its complexity. I didn’t have the extensive background needed to interpret the rawest form of the transformed data, which looked like a spectrum of many different colors and imperfections. Through my research, as I watched YouTube video lectures to help me understand the nature of EEG data and the MATLAB language, I found a resource: the FieldTrip toolbox. The FieldTrip toolbox was an additional extension that allowed me to create topological maps of the brain, which would not be as difficult to interpret. Through helpful articles on the FieldTrip website, many StackExchange threads, and the FieldTrip and MATLAB documentations, I succeeded!

- As I researched, I realized the different units by which the transforms expressed intensity (power vs. scale, respectively) would make a quantifiable comparison difficult. As a result, I also learned how to normalize data and adjust units of the CWT output to match those of the FFT. While this did not completely eliminate the issue, it did reduce it.

 

      b. What did you learn from overcoming these problems?

 

On a concrete level, I gained a lot of technical abilities — MATLAB programming skill, EEG data analysis, and knowledge about Fourier transforms and wavelet transforms. More importantly, though, I learned how much I enjoy the problem-solving identity of research. I love this process of learning a lot about a subject in a very short amount of time; I love going deep into a slice of something much bigger. As someone who loves exploring different areas, it's refreshing to know I have the capacity to go this deep into one and to be thrilled at the prospect of going deeper still. 

 

I also reaffirmed the knowledge that I love challenging myself. Though frustrating at times, I loved learning MATLAB at questionable hours in the a.m., and I loved applying

Fourier transforms in a biological application (as opposed to the physics applications my mentor’s area of expertise was) simply because I really wanted to research something related to depression. I especially loved that the research I did felt meaningful. Depression is something that has thankfully not afflicted me, but I've always been concerned for the mental health of those around me. 

 

 

5. If you were going to do this project again, are there any things you would do differently the next time?

 

If I were to redo this project, I would broaden the scope of my data. Specifically, I would compare the topographic maps of both healthy and unhealthy (depressed) subjects, to control for natural differences in the way the Fourier transform and wavelet transform analyze certain frequency ranges. I would also aim to compare more types of signal analysis methods from the start, as I realized later on in the project that my code could potentially work very well with other common transforms, with some adjustment. 

 

6. Did working on this project give you any ideas for other projects? 

 

Yes! After working on this project, I found myself intrigued by the types of data used in neurological studies. EEG is one of the most common, but there are others, including functional magnetic resonance imaging (fMRI), positron emission tomography (PET), and single-photon emission computed tomography (SPECT). I’d like to compare these data types on the same set of subjects and with the same analysis methods, to understand how each translates to depression detection. 

 

In the future, when I have more resources and knowledge at my disposal, I’d also like to look into machine learning and generative AI algorithms for EEG data. Our quickly-improving age of information processing aligns very well with the information-rich, but often confusing, nature of EEG data. This is an area I’m actually very excited to pursue in the future!

 

While not a formal research interest, I’m actively learning about the biological mechanisms of depression (such as tissue decay in certain areas of the brain), as well as how the different frequency bands used to analyze EEG data have been historically determined.

 

7. How did COVID-19 affect the completion of your project?

 

N/A