1
我的數據包含16通道x128samplesx400trials。我想在這個數據集中執行詳盡的頻道選擇。我應該在哪裏應用PCA?詳盡通道/功能選擇中的降維
unsortedChannelIndices = [1:16]
sortedChannelIndices = [];
%Option 1
reducedData = PCA(data, classIndeces)
for chIdx = 1:length(unsortedChannelIndices)
for c=1:length(unsortedChannelIndices)
thisChannel = unsortedChannelIndices(c)
thisChannelSet = [sortedChannelIndices, thisChannel];
%Option 1
thisData = reducedData(thisChannelSet,:,:);
%Option 2
thisData = PCA(data(thisChannelSet, classIndeces)
thisPerformance(c) = eval_perf(thisData);%crossvalidation
end
[performance(chIdx),best] = max(thisPerformance);
sortedChannelIndices = [sortedChannelIndices,unsortedChannelIndices(best)];
unsortedChannelIndices(best) = [];
end