Code Monkey home page Code Monkey logo

wave-train-analysis's Introduction

Wave-Train-Analysis

Using 2D and 3D AUC diagrams we provide improved detection accuracy of Parkinson's disease

There are the Matlab files to analyze electroencephalogram (EEG), electromyogram (EMG), and tremorogram data.

The idea of the method of wave train electrical activity analysis is that we consider the biomedical signal as a combination of the wave trains. The wave train is an increase of the power spectral density of the signal localized in time, frequency, and space. We detect the wave trains as the local maxima in the wavelet spectrograms. We do not consider wave trains as a special kind of signal.

We investigate the following wave train parameters: wave train central frequency, wave train maximal power spectral density, wave train duration in periods, and wave train bandwidth. We have developed special graphical diagrams, named AUC diagrams, to determine what wave trains are characteristic of neurodegenerative diseases.

The 2D AUC diagram demonstrates the AUC values corresponding to different ranges of the given wave train parameter (please see examples of the AUC diagrams below). The range of the wave train parameter is characterized by the lower and upper bounds -- namely, the minimal and maximal values of the parameter. The abscissa indicates the lower bound of the considered parameter, while the ordinate indicates the upper bound of the considered parameter. The AUC value is displayed using a colormap. The standard jet colormap is applied in the examples given in this paper. Low AUC values are displayed in blue and high AUC values are displayed in red in this colormap. AUC values close to 0.5 are displayed in green.

You can read about our method in our NEW PAPER: Sushkova O.S., Morozov A.A., Gabova A.V., Karabanov A.V., Illarioshkin S.N. A statistical method for exploratory data analysis based on 2D and 3D area under curve diagrams: Parkinson’s disease investigation // Sensors / Ernest N. Kamavuako (Eds.). – MDPI, 2021. – V. 21, Issue 14. – P. 4700. – URL: https://www.mdpi.com/1424-8220/21/14/4700/htm

and in paper: O.S. Sushkova, A.A. Morozov, A.V. Gabova, A.V. Karabanov. Investigation of Surface EMG and Acceleration Signals of Limbs’ Tremor in Parkinson’s Disease Patients Using the Method of Electrical Activity Analysis Based on Wave Trains // Advances in Artificial Intelligence: 16th Ibero-American Conference on AI, IBERAMIA 2018, Trujillo, Peru, November 13-16, 2018, Proceedings / G.R. Simari, F. Eduardo, F. Gutiérrez Segura, J.A. Rodríguez Melquiades (Eds.). – Springer Nature Switzerland AG, 2018. – V. 11238 LNAI. – P. 253-264. – DOI: 10.1007/978-3-030-03928-8_21, URL: https://link.springer.com/chapter/10.1007/978-3-030-03928-8_21

The method for differential diagnostics of essential tremor and early and first stages of Parkinson's disease based on the wave train electrical activity analysis was patented: Sushkova, O.S.; Morozov, A.A.; Gabova, A.V.; Karabanov, A.V. Patent no. 2741233 Russian Federation. Method for differential diagnosing of essential tremor and early and first stages of Parkinson’s disease using wave train activity analysis of muscles. 22.01.2021, 2021. URL: https://patents.s3.yandex.net/RU2741233C1_20210122.pdf, https://vk.com/doc3677041_598307131?hash=8a08fdf190fd8be6be&dl=b85141c3507eb41c6c

The code of the program for the wave train electrical activity analysis was registrated: Certificate No. 2015660136. Program for signal processing and statistical analysis of the parameters of the peaks of the envelope of EEG, EMG and accelerometer signals for experimental investigations of Parkinson's disease: certificate of state registration in the Register of computer programs / O.S. Sushkova, A.A. Morozov; applicants and copyright holders: O.S. Sushkova, A.A. Morozov. - No. 2015617150; declared 07/28/2015; registered 22.09.2015. URL: https://www1.fips.ru/iiss/document.xhtml?faces-redirect=true&id=6d7f4f22afd7d8feb324556db79591a8, https://vk.com/doc3677041_598306391?hash=114b4257ba87c3767e&dl=d03923c9743890cac1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Please note the following code does not operate in Matlab 2013b version!

Run the eegemg_allmetrics2mat.m m-file to generate the files with wave train parameters of investigated data.

%%%

In the "InputFolder" value please indicate your folder with data for analysis. This folder must contain a txt file with a signal for analysis.

%%%

In the "Method" value you can choose the "COMPLEX_MORLET" or "FFT" method for processing. To reproduce our method please choose "COMPLEX_MORLET" and in the "ListOfMetrics" value please choose "FLASHES_PER_SEC".

%%%

Please select the "true" value in "plot_signals" value if you need to plot signals;
EMG

Please select the "true" value in the "calc_spectra" value if you need to calculate spectra (this option is available if the "FFT" method for processing is chosen);

Please select the "true" value in the "plot_spectra" value if you need to plot spectra;

Please select the "true" value in the "calc_wavelets" value if you need to calculate wavelets (this option is available if the "COMPLEX_MORLET" method for processing is chosen);

Please select the "true" value in the "plot_wavelets" value if you need to plot wavelets;
EMG

Please select the "true" value in the "plot_flash_diagrams" value if you need to plot wave train flash diagrams;

Please select the "true" value in the "save_figures" value if you need to save figures;

Please select the "true" value in the "save_flash_diagrams" value if you need to save wave train diagrams (this option must have a "true" value to reproducing our method);

Please select the "true" value in the "save_wavelet_matrices" value if you need to save wavelet matrices;

Please select the "true" value in the "calc_histograms" value if you need to calc histograms;

Please select the "true" value in the "eliminate_beta" value if you need to eliminate the beta range;

Please select the "true" value in the "plot_histograms" value if you need to plot histograms.

%%%

Please note that the "ChannelNames" value contains the channel names that are presented in your file for analysis.

In the "ChannelNamesSelectedByUser" value you need to choose what channel name you want to analyze. Please note that if you choose a channel with the "EMG" prefix, a program will preprocess your signal with a 60-240 Hz filter and calculate an envelope of the signal. For other channels, a filter of 2-240 Hz will be applied. For modifying this preprocessing option please correct this in the "preprocess_signal" m-file.

At last, when the program will finish the processing of files in your program you can repeat this procedure and process other files in another folder. For instance, you can process two folders with files and compare calculated data in next programs (calculate_auc_008_fast_phase_time_psi0.m and analyze_auc_fast_phase_time_psi0.m).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Run the calculate_auc_008_fast_phase_time_psi0.m m-file to calculate AUC values based on the files calculated by the previous program (eegemg_allmetrics2mat.m).

In the "Names" value please indicate two your folders with data for analysis. These folders must contain mat-files with parameters of wave trains calculated by the previous program (eegemg_allmetrics2mat.m). Using calculate_auc_008_fast_phase_time_psi0.m you can compare two datasets in these two folders.

In the "CName" value you need to choose what channel name you want to analyze. This name must be the same as in the previous program (eegemg_allmetrics2mat.m).

%%%

Please select the "true" value in the "calc_hole" value if you need to calculate only AUC values, where the statistically significant differences are observed.

Please select the "true" value in the "plot_roc" value if you need to plot the ROC curve.

%%%

Then you need to choose what type of AUC diagram you need to calculate. If you need to calculate the Frequency AUC diagram, please indicate the range of minimal values of frequencies in the "MinFreq" value. For instance "MinFreq= [1:1:50]" and please indicate the range of maximal values of frequencies in the "MaxFreq" value. For instance the "MaxFreq= [1:1:50]"; Other values (MinFreq, MaxFreq, MinAmpl, MaxAmpl, MinDurat, MaxDurat, MinDurat_in_Periods, MaxDurat_in_Periods, MinBandwidth, MaxBandwidth) please left as constants. For instance, the "MinAmpl = 0";

The same procedure works for other types of AUC diagrams. You need to indicate ranges of minimal and maximal values for the AUC diagram, which you want to calculate. Other values you need to leave as constants.

%%%

In the last step, you need to save the calculated AUC values in the mat-file. Please write the special name of your calculated AUC values. For instance "save( ['Table_AUC_values_Frequencies']".

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Run the analyze_auc_fast_phase_time_psi0.m m-file to analyze calculated AUC values and plot 2D AUC diagrams.

In the "FileName" value please indicate the file name with data for analysis. This mat-file must contain AUC values calculated by previous program (calculate_auc_008_fast_phase_time_psi0.m).

Next, you need to choose the dimension of the AUC diagram. If in the previous program you calculated AUC values for the Frequency AUC diagram, you need to choose the "Freq" value.
EMG

If in the previous program you calculated AUC values for the Amplitude AUC diagram, you need to choose the "Ampl" value.
EMG

If in the previous program you calculated AUC values for the Duration AUC diagram, you need to choose the "Durat" value.

If in the previous program you calculated AUC values for the Duration in Periods AUC diagram, you need to choose the "Durat_in_Periods" value.
EMG

If in the previous program you calculated AUC values for the Bandwidth AUC diagram, you need to choose the "Bandwidth" value.
EMG

That's all

wave-train-analysis's People

Contributors

olgasushkova avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.