1
$\begingroup$

So I have a question on clustering vs. classification. I know there are tons of questions on this here and elsewhere on the Internet, but I have not found my answer so far. I think this (A clustering and classification question) is closest that I have found so far.

Let's says that we have the standard dataset on breast cancer in sklearn. There exists a target variable that is 1 if the tumor is cancerous and 0 if benign. The standard approach would be to use a classification algorithm, such as SVM. But since we know that there are only two possible outcomes (either canceours or benign), why can't we use a clustering algorithm, such as Kmeans? I now that our data is labeled, and therefore we should use a supervised algorithm, but I don't understand why we can't use an unsupervised algorithm (e.g. Kmeans) since we actually know the number of clusters (2 in this case). What am I missing? Is it that I simply assume that the data will cluster on the outcome variable, instead of at something else, and that I assume that there only will be 2 clusters?

$\endgroup$

2 Answers 2

1
$\begingroup$

With supervised learning you point what exactly you want the algorithm to learn. If you had a medical data on patients diagnosed with cancer or not, clustering algorithm may find many different kinds of pairs of clusters, e.g. young vs old patients, men vs women, etc., and you have no guarantee that it would be about the medical condition. Of course, if unsupervised algorithm correctly identified the known clusters, such result would be interesting, because it’d show that it is evident in the data.

$\endgroup$
1
$\begingroup$

In your example, SVM will try to divide your observations into two groups: cancerous and benign. Clustering looks at all of the features of the observations and tries to form clusters such that the points within each cluster are most similar to each other. It doesn't care about whether a tumor is cancerous or benign, just which tumors are similar to each other. Therefore, the resulting clusters will likely have a random mixture of both cancerous and benign tumors. You can look at a new point and determine whether it belongs in group A or group B, but that doesn't help you decide whether the observation is cancerous or not.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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