2015-10-13 65 views
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 

回答

0

PCA或任何降維技術應與將要分析的數據一起應用。如果我們評估對應於較少信道的子集的性能(例如1:4),則應該在該數據中應用任何降維技術(PCA(data([1:4),:),因此,選項2是正確的選擇。