kNN Classification on SSVEP response

Dear all,
I am currently doing a project on SSVEP-EEG BCI and in the stage of features classification. The raw EEG signal has passing through pre-processing using bandpass filter then DWT and CCA for Features Extraction. I wonder how could I classify the extracted features using kNN for both DWT and CCA? Could someone please help me?
Thank you very much.

 Accepted Answer

Star Strider
Star Strider on 23 Jan 2019
In my experience, to use knnsearch (link) with data, the idea is to begin with samples that have known classes, then compare them with the rest of your data. (I did this decades ago using EEG spectrogram data.) The knnsearch algorithm will then discover the closest matches to the known data and use that as the basis of its classification.
I would simply create a matrix of the vectors of the features you want to match, and use that. Of course, the relevant features must be in the same locations in each vector, and the vectors must have the same lengths. I am not certain whether you want to classify the DWT and CCA results separately. You could do that, with separate knnsearch runs, or you could concatenate the DWT and CCA results in each vector and submit those to knnsearch.
I have never done what you are doing, so I have no experience with the techniques you are using.

5 Comments

Thanks for your reply. As i researched online, I found out after DWT extraction process, there are some statictical calculation need to be performed to the required sub band like standard deviation or shannon entrophy then only can apply kNN to classify it. Is it true? Thank you.
My pleasure.
I have very limited experience with DWT and classification. If your source is reputable, and if the literature generally supports such processing, then it is best for you to do it.
David, that is partially correct. Like Star said, for KNN you need to have some reference to compare your data to. Like a set of data that is the averages of the features measured from "normal" data, or another reference set from an arrythmic set or something.
By the way, the Mathworks did a demo about a year ago where they were using deep learning to characterize ecg signals. I think they first used a spectrogram and then wavelets to produce an image and then fed it into a CNN network that had transfer learning applied. With that method, they also were required to train it with sets of normal and abnormal data before you applied it to the unknown, test signals. You might want to look at that since there could be other ways of classifying your data than KNN.
See these links:
I used clusters for decades of missile component (tank/missiles/decoys/deployment-debris) classification before I invented neural networks. I obtained the best results when I began with UNCLASSIFIED CLUSTERING in order to determine the optimal choice for classification cluster centers.
Greg
Thank you so much Star, Image and Greg. I will look into the documents.
As from my understanding as well, Canonical Correlation Analysis, CCA is kind of statistical method to extract the features of EEG by comparing the coeffiicient a reference signal with the EEG signal, higher coefficient value means more information available in the EEG signal and that will be the features,
I wonder whether CCA is also kind a classification method which may have same function as kNN just the method is different?

Sign in to comment.

More Answers (0)

Categories

Asked:

on 23 Jan 2019

Commented:

on 24 Jan 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!