Clustering/sorting of close data points
10 次查看(过去 30 天)
显示 更早的评论
Hello all,
I would like to bundle up some close data points. This is how my data looks like: 214981 366893 455877 455877 455877 455878 889359 889359 1443570 1443570........
Can anybody suggest an easy way to do this?
Thanks.
Raju
6 个评论
Walter Roberson
2022-7-11
Consider for example your value 455877 : what is the minimum and maximum value that you wish to be considered to be the same group as 455877, if those values were encountered as data?
Consider also 214981: what is the minimum and maximum value that you wish to be considered to be the same group as 214981, if those values were encountered as data?
I ask about two different values because the boundary for higher values might not have the same range as for lower value. For example in [1 8 25] the 8 might be considered to be relatively far from the "1" (since it is 8 times the value), whereas by the time you got to 200000, the value 200010 might be considered "close" to 200000 since the difference is pretty small relative to the value.
回答(1 个)
Image Analyst
2022-7-11
编辑:Image Analyst
2022-7-12
This is really too broad a question to answer yet. You haven't even plotted your data or told us what "close" is. I suggest you start by reading this page:
Maybe you can simply take the histogram.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
This is how I'd classify your data. Basically you can do it manually for such few data points. For far more data points, you can try the Classification Learner App on the apps tab of the tool ribbon. Even for these few, it looks like SVM might be good. But please attach far more data so we can find the best classifier.
data = [214981 366893 455877 455877 455877 455878 889359 889359 1443570 1443570]';
classes = [1,1,1,1,1,1,2,2,3,3]';
plot(data, 'b.', 'MarkerSize', 30);
grid on;
2 个评论
Image Analyst
2022-7-12
Exactly how are you seeing clusters in that data?
s = load('raju.mat')
toa = s.ToA;
classes = [1,1,1,1,1,1,2,2,3,3]';
plot(toa, 'b.', 'MarkerSize', 10);
grid on;
xlabel('Index of Vector')
ylabel('Value of toa')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discriminant Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!