How to perform k-means clustering on Spectrogram (Short Time Fourier Transform) to cluster frequency band.

8 visualizaciones (últimos 30 días)
In this paper, it suggest using k-means clustering on spectrogram to cluster frequency bands. So, for each audio signal, I get a f x t matrix with f is frequency bin and t is time sequence for that bin. I don't know how to perform k-means on that matrix.

Respuestas (1)

KSSV
KSSV el 22 de Mzo. de 2018
Check the below example code:
x = rand(1000,1) ; y = rand(1000,1) ; % random points
N = 4 ; % number of groups
[idx,C,sumd] = kmeans([x y],N) ; % apply kmeans
figure
hold on
for i = 1:N
plot(x(idx==i),y(idx==i),'.') ;
plot(C(i,1),C(i,2),'*')
end
  1 comentario
Alvin Nguyen
Alvin Nguyen el 22 de Mzo. de 2018
Hi, It seem you are perform k-mean on just 1000x2 matrix. The my main problem is, the matrix f x t will always has the same number of row f but the number of t will increase for longer file. So I can't get how to perform on such matrix.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by