3
$\begingroup$

I started with a dataset that contained many dimensions for individuals (each id is a separate individual), and extracted three Features/Attributes columns for each individual Id.

My goal is to bucket these individuals into two or three distinct groups, based on these features, to see if I can identify distinct separations between certain groups.

I was wondering if anyone has any recommendations, or algorithms (preferably in Python) that would cluster these individuals into distinct groups? I do not have these Individuals classified, so it's an unsupervised clustering problem. I was thinking that K-Means might be a good option, or something similar to PCA which could reduce my dimensionality and provide insight into the Features that seem to separate the groups of individuals into distinct groups.

Thanks for looking!

Note: The data shown below was artificially generated to illustrate my question.

enter image description here

Appendix: Reference Data:

Pattern,Feature A,Feature B,Feature C

6,2.18,0.13,8.00
9,9.31,3.67,6.58
11,0.89,1.83,4.33
13,9.73,9.50,1.59
23,0.51,6.49,0.09
26,9.04,3.42,3.90
27,8.35,9.18,3.40
28,3.04,5.63,6.88
32,9.78,6.52,8.50
43,4.11,3.36,1.83
49,9.57,1.52,7.09
51,1.13,9.98,9.42
53,6.22,1.37,7.07
62,8.79,3.03,7.52
63,6.27,7.29,0.98
71,4.64,0.06,6.55
73,1.34,9.32,5.15
83,4.53,3.85,2.04
84,9.48,9.71,3.23
86,3.80,3.00,0.76
88,1.73,0.64,9.96
$\endgroup$
3
$\begingroup$

Sounds like you are on the right track. There are many ways to attack this problem. If you want to visualize the clustering, it would help to reduce the data down to two components. This could be done via PCA or manifold learning if you want to go non-linear (http://scikit-learn.org/stable/modules/manifold.html).

In terms of clustering, there are many different methods to do this. Here are some comparisons of different methods: http://scikit-learn.org/stable/modules/clustering.html

$\endgroup$
1
$\begingroup$

Clustering is the process by which you create groups of similar items so that the difference between the items within groups is minimised and the difference between the items in different groups is maximised. Therefore, you are on the right track, as the previous answer already stated.

You could start by something simple, like k-means, and then keep improving your model depending on the results (another simple option is hierarchical clustering). However, there are several things that you should take into account. For instance, it may be advisable to normalise/standardise the data before clustering, so that the relative importance of all the features is the same. Additionally, some methods (like for instance k-means) require a priori knowledge of the number of groups in your data. Therefore, if you don't have such knowledge, you will have to decide how to test your clustering results for several numbers of clusters and how will you choose the best model.

PCA is not a clustering algorithm, but a dimensionality reduction algorithm. If your data has only three features, I don't really think that you would need PCA beforehand. Clustering methods based on distance metrics do not perform well in case of higher dimensional data (however, some tricks can still be used), but three features is not bad in that regard. However, applying PCA may be useful if you want to visualise the groups and your data. Once again, since you only have three features, just making a 3D plot may be enough.

Just start applying some methods, explore your data, and let the results help you decide what the next step is.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.