How to find clustering directions from a dataset?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

I have a time-domain dataset that has the form of x (where x(t) = A s(t)). In the transformed (Fourier) domain the dataset is clustered in certain directions which are given by the vectors of matrix A. I am trying to use fuzzy c-means clustering to get these directions (i.e. column vectors forming A) back. How can I do so? (I tried using the built-in function fcm but could not get anything useful for directions). Here's my code
clc
clear;
close all;
fs =500;
t = 0:1/fs:10-1/fs;
s = [sin(2*pi*2*t); sin(2*pi*10*t); sin(2*pi*50*t)];
A = [1 0.5 0.1;
1 -0.5 0.3;];
x = A*s;
X = (dct(x'))';
plot(X(1,:),X(2,:))
hold on
plot(X(1,:),X(2,:),'O')
xlabel('X_1(f)'); ylabel('X_2(f)');
% findcluster
[center,U,obj_fcn] = fcm(X,3);
You can see from the plot that the data tends to cluster in the directions of a1=[1;1], a2=[0.5;-0.5] and a3=[0.1;0.3]
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!