O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Text clustering

In the previous sections, we used the lastword technique for categorizing types of purchases by simple keywords. We could also use more sophisticated techniques such as word clustering to try to identify which types of purchasing clusters occur and then use that to subset the association rules. To illustrate text clustering on our OnlineRetail dataset, we will first need to load our training and test dataframes that we previously saved. Also, issue a set.seed command since we will be doing some sampling later on:

setwd("C:/Users/randy/Desktop/ch6") # load the training data load("OnlineRetail.full.Rda") set.seed(1)

We previously demonstrated some text mining examples using a package called RTextTools. Another popular text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required