MATLAB Answers

I have five data points (A, B, C, D, E) in a two dimensional plane. Based on the euclidean distance between these points how can I group them?

2 views (last 30 days)
Shaik Ahmad
Shaik Ahmad on 22 Mar 2019
Commented: Shaik Ahmad on 22 Mar 2019
I have five data points (A, B, C, D, E) in a two dimensional plane where three points (A, B, D) are close to each other and remaining two (C, E) are far from the group. If I calculate the distances between these points the results are
dist(A, B) = 0.3, dist(A, C) = 1.3, dist(A, D) = 0.15, dist(A, E) = 1.0, dist(B, C) = 0.9, dist(B, D) =0.2, dist(B, E) = 1.1, dist(C, D)=1.6, dist(C, E) = 1.0, dist(D, E) = 1.5.
Now if I choose a distance threshold as 0.6, I need to get a result as:
A, B, D (Closer to each other)
C (far from other points)
E (far from other points)

  0 Comments

Sign in to comment.

Answers (1)

KSSV
KSSV on 22 Mar 2019
Read about kmeans.

  3 Comments

Shaik Ahmad
Shaik Ahmad on 22 Mar 2019
Dear @KSSV thank you for your response.
I read about kmeans, there I need to mention the number of clusters. I am searching for a solution where the number of clusters are calculated automatically by using a predefined distance threshold.
KSSV
KSSV on 22 Mar 2019
Yes...for kmeans you need to provide the number of clusters. Why don't you give your points. Let me give a trry.
Shaik Ahmad
Shaik Ahmad on 22 Mar 2019
I found a solution for that.
I need to apply Hierarchical Clustering to get that output. Here There are functions called pdist and linkage which do the work.
Thank you for yout support @KSSV

Sign in to comment.