フィルターのクリア

How to extract features to train and test dataset for emotion recognition signal using GSR?

6 ビュー (過去 30 日間)
RAMOS UKAR
RAMOS UKAR 2022 年 5 月 20 日
コメント済み: Shivansh 2024 年 1 月 24 日
Hello, I have ASCERTAIN dataset which is consists of GSR signal. But, there is a problem with my coding when I want to proceed train and test daatset from extract features using classifier. Here is my coding.
Data_GSR
% Filter the signals with a highpass filter
Data_GSRFiltered = highpass(Data_GSR,0.7,64);
meanFE = signalTimeFeatureExtractor("Mean",true,"SampleRate",64);
timeFE = signalTimeFeatureExtractor("RMS",true,...
"ShapeFactor",true,...
"PeakValue",true,...
"CrestFactor",true,...
"ClearanceFactor",true,...
"ImpulseFactor",true,...
"SampleRate",64);
freqFE = signalFrequencyFeatureExtractor("PeakAmplitude",true,...
"PeakLocation",true,...
"MeanFrequency",true,...
"BandPower",true,...
"PowerBandwidth",true,...
"SampleRate",64);
fftLength = 256;
window = rectwin(size(Data_GSR,1));
setExtractorParameters(freqFE,"WelchPSD","FFTLength",fftLength,"Window",window);
mindist_xunits = 0.25;
minpkdist = floor(mindist_xunits/(64/fftLength));
setExtractorParameters(freqFE,"PeakAmplitude","MaxNumExtrema",6,"MinSeparation",minpkdist);
setExtractorParameters(freqFE,"PeakLocation","MaxNumExtrema",6,"MinSeparation",minpkdist);
meanFeatureDs = arrayDatastore(Data_GSR,"IterationDimension",2);
meanFeatureDs = transform(meanFeatureDs,@(x)meanFE.extract(x{:}));
timeFeatureDs = arrayDatastore(Data_GSRFiltered,"IterationDimension",2);
timeFeatureDs = transform(timeFeatureDs,@(x)timeFE.extract(x{:}));
freqFeatureDs = arrayDatastore(Data_GSRFiltered,"IterationDimension",2);
freqFeatureDs = transform(freqFeatureDs,@(x)freqFE.extract(x{:}));
meanFeatures = readall(meanFeatureDs,"UseParallel",true);
timeFeatures = readall(timeFeatureDs,"UseParallel",true);
freqFeatures = readall(freqFeatureDs,"UseParallel",true);
features = [meanFeatures timeFeatures freqFeatures];
featureTable = array2table(features);
head(featureTable)
  1 件のコメント
Shivansh
Shivansh 2024 年 1 月 24 日
Hi Ramos!
Can you share the error message you are getting while feature extraction using GSR?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by