Icon

01_​Document_​clustering

Importing, preprocessing, and clustering of textual data

The goal of this workflow is to cluster a set of newsgroup documents into their corresponding topic. The data is taken from the 20 newsgroups dataset. The workflow starts with a data table containing some newsgroup documents, divided into two categories, politics.guns and sport.baseball.

First, the data are converted into documents, whose category is the class politics or sport. The documents are then preprocessed by filtering and lemmatizing. After that, the documents are transformed into a bag of words, which is filtered again. Only terms that occur at least in 1% of the documents (at least in 2 documents) will be used as features and not be filtered out. Then the documents are transformed into document vectors.

The document vectors are a numerical representation of documents and are in the following used for hierarchical clustering based on Manhattan, Euclidean, and Cosine distance measures.

URL: Newsgroup dataset http://qwone.com/~jason/20Newsgroups/

This workflow shows how to import textual data, preprocess documents by filtering and stemming, transform documents into a bag of words and document vectors, and finally cluster the documents based on their numerical representation.
Data Import
Preprocessing
Transformation
Clustering
News groupsdataset
Table Reader (deprecated)
CSV Reader
Stop Word Filter
Decision Tree Learner
Partitioning
Scorer
Decision Tree Predictor
Scatter Plot
N Chars Filter
Number Filter
Euclidean
Distance Matrix Calculate
Punctuation Erasure
Column Filter (deprecated)
Markup Tag Filter
Hierarchical Clustering (DistMatrix)
Cosine
Distance Matrix Calculate
Case Converter
Stanford Lemmatizer
Column Filter (deprecated)
Hierarchical Cluster View
PCA
Based on document frequency
Term Filtering
Vector creation
Document Vector
Convert todocuments
Strings to Document
Column Filter
Hierarchical Cluster View
Hierarchical Clustering (DistMatrix)
Column Filter (deprecated)
Hierarchical Cluster View
Distance threshold
Hierarchical Cluster Assigner (local)
k=2
k-Medoids
Hierarchical Clustering (DistMatrix)
color by category (class)
Color Manager
Manhattan
Distance Matrix Calculate
Category to Class

Nodes

Extensions

Links