필터 지우기
필터 지우기

Code for Common spatial pattern

조회 수: 9 (최근 30일)
upasana talukdar
upasana talukdar 2015년 8월 3일
댓글: behtam adeli 2021년 2월 18일
Hello,
I am trying to implement Common Spatial pattern technique to extract some features from Deap dataset for classification. Can somebody share his code of CSP with me as I am not getting very good variance separation between classes. I am trying it with the file available in the link http://in.mathworks.com/matlabcentral/fileexchange/22915-common-spatial-patterns.
May be I am doing some mistake in extracting the features from the filtered signal. It will be helpful for me if someone show me the way to extract features correctly.
Any comments or suggestions....
Upasana
  댓글 수: 2
xiao
xiao 2019년 7월 9일
If you have finished the classification algorithm of DEAP dataset based on csp, I feel a little confused. I hope you can share your paper and code for me to learn. Thank you very much.
behtam adeli
behtam adeli 2021년 2월 18일
The code that has been linked just produces the Projection matrix as it has been mentioned at the end of the code (%Resulting Projection Matrix-these are the spatial filter coefficients).
You need to multiply this matrix with you original data and then extract your feature. A famous feature is the log of variances like this:
Z = Projection{class}([1,end],:)*orginialData';
feature =log([var(Z(1,:)),var(Z(2,:))]./(var(Z(1,:))+var(Z(2,:))));
I hope this helps someone.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Install Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by