Data Mining and Machine Learning

Aug-Nov, 2013

Assignment 2: Clustering

5 November, 2013


The "Bag of Words" data set from the UCI Machine Learning Repository contains five text collections in the form of bags-of-words. The original URL for the UCI repository is http://archive.ics.uci.edu/ml/datasets/Bag+of+Words.

Your task is cluster the documents into K clusters using K-means clustering.

  1. Use the "standard" TF-IDF vector representation for each document in collection XYZ in terms of the words specified in vocab.XYZ.txt. (Use the TF-IDF definition from Web Data Mining by Bing Liu, Chapter 6.2.2, page 189.)

  2. Use cosine to measure the distance between documents.

Report your results on the three smaller datasets (Enron emails, NIPS blog entries, KOS blog entries) for different values of K and different choices of initial centroids.

In addition to the actual output, report the time it took to complete the job and, in case your program did not terminate for a given dataset and combination of K and initial centroids, report how long you tried before you gave up.

The three smaller datasets from this repository that you need for this assignment are also available locally at http://www.cmi.ac.in/~madhavan/courses/datamining13-aug/assignment2/bag-of-words.

In each of the text collections, each document is summarized as a bag (multiset) of words. The individual documents are identified by document IDs and the words are identified by word IDs.

After some cleaning up, in each collection the vocabulary of unique words has been truncated to only keep words that occurred more than ten times overall in that collection.

For each collection XYZ:

As usual, a K-itemset of words is a collection of words of size K that occur together in the same document. Your assignment is to write a program to find all K-itemsets of words occurring with frequency F, where K, F and the name of the dataset to use should be parameters to your program.

The datasets are of different sizes. Report your results on the three smaller datasets (Enron emails, NIPS blog entries, KOS blog entries) for different values of K and F. In addition to the actual output, report the time it took to complete the job and, in case your program did not terminate for a given dataset and combination of K and F, report how long you tried before you gave up.

Information about the datasets in the repository


Last updated Tue 15 Oct, 2013