我想通过使用k-means来实现该算法来估计瞬时欠定混合矩阵。首先我们考虑无噪声模型,未确定的BSS可以描述为:X=AS
其中A是m乘n矩阵,X是n乘T矩阵,S是n乘T矩阵。 m是观察数,S是源矩阵,A是混合矩阵。
我们通过将三个音频源混合在一起产生两个混合信号,包括吉他信号,钢琴信号和鼓信号。
A = [0.6118 0.9648 0.2360; 0.7910 0.2629 0.9718];
此paper中提到的算法总结了此算法:
%% load Data
Nsamp=1024*16;
N=3; %number of sources
M=2; %number of sensors
S=zeros(3,Nsamp);
[S(1,:),fs1]=wavread('guitar',Nsamp); % returns only the first N samples from each channel in the file.
[S(2,:),fs2]=wavread('piano',Nsamp); % returns only the first N samples from each channel in the file.
[S(3,:),fs3]=wavread('drum',Nsamp); % returns only the first N samples from each channel in the file.
%% Mixing Matrix
fs=44100;
A=[0.6118 0.9648 0.2360;0.7910 0.2629 0.9718];
for i=1:Nsamp
X(:,i)=A*S(:,i);
end
%% STFT X
figure(3);
X1=spectrogram(X(1,:));
X2=spectrogram(X(2,:));
%normolize
X1n=X1(:)/norm(X1(:));
X2n=X2(:)/norm(X2(:));
x=[abs(X1n(:)),abs(X2n(:))];
[I C]=kmeans(x,3);
我在集群中心实施后的答案是:
>> C'
ans =
0.1337 0.0534 0.0008
0.1483 0.0363 0.0007
我不知道我的代码有什么问题,我怎么能用k-means算法估算基于混合矩阵的stft,答案应该比这要好得多。但是这个算法的答案应该是A ^ = C = [0.6165 0.3100 0.9247; 0.7841 0.9447 0.3547]正如本文{3}中提到的那样。
我的问题是: 1-是我的实现,我的代码适合这个算法? 2-如果是对的!那么为什么剂量答案我的意思是混合矩阵估计远离混合矩阵?