How to find clustering directions from a dataset?
2 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150926/image.jpeg)
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fuzzy Logic Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!