1
$\begingroup$

If you are asked to do text categorization using clustering. Which algorithm would you use and why?

$\endgroup$
1
  • 3
    $\begingroup$ Almost any algorithm will do the trick. On the other hand it is worth spending some thought on what features of the texts you want to use as a base for the clustering. This depends very much on your research question. $\endgroup$
    – user10169
    Commented Nov 25, 2015 at 15:43

3 Answers 3

1
$\begingroup$

It will depend on the purpose and the text. Many options this is what I have used.

k-means clustering with TF-IDF

What I did was limit the cluster and any document vector to the top 1000 terms sorted by weight. This not only results in faster processing but you get some multi modal clusters and will have thousands and thousands of terms. What happens is those really long vectors dilute the similarity when compared to a even a long single document. I think you also get faster convergence. If you want to keep documents out of multi modal clusters then don't truncate the cluster vector.

$\endgroup$
1
  • $\begingroup$ What's K9? You linked to k-means. $\endgroup$
    – Emre
    Commented Nov 25, 2015 at 18:06
1
$\begingroup$

tf-idf vectors are an easy start, but it can be hard to cluster very high dimensional data.

You might try topic modeling (LDA, LSI for example) to reduce the dimensionality of your features.

A newer approach is paragraph vectors, which learn a distributed representation of arbitrary-length text. Here is an implementation in python.

Learning a reasonable, lower dimensional representation of the text can help with the issues that arise trying to cluster high dimensional data.

$\endgroup$
1
  • $\begingroup$ The link on paragraph vectors doesn't work. $\endgroup$
    – SmallChess
    Commented Nov 26, 2015 at 2:53
0
$\begingroup$

Text categorization using clustering can be done in a lot of ways. Some of which are:

In fact, most(or almost all) the clustering algorithms can be applied for classifying text through clustering.

$\endgroup$
2
  • $\begingroup$ k-means is not the knn algorithm (and not a good choice) $\endgroup$ Commented Nov 25, 2015 at 23:12
  • $\begingroup$ @Anony-Mousse Thank you for spotting the spelling error. Rectified. As the OP asked about any algorithm, I included k-means which I have used once, and is a relevant answer. $\endgroup$
    – Dawny33
    Commented Nov 26, 2015 at 2:22

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