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

Analyzing consumer complains data using SVM

In this example, we will use a text classification model to define a linear SVM model. Unstructured text data is a perfect way to illustrate SVM since the data is very high dimensional.

To illustrate SVM classifiers, we will begin by reading in some consumer complaint data regarding student loans. We will be using two packages, e1071 and RTextTools:

install.packages("e1071") 
install.packages("RTextTools") library(e1071) 
library(RTextTools) 

Begin by loading the data from the CSV file. The data frame simply consists of some consumer narrative regarding student loans, along with how the complaint was classified. The goal is to develop a SVM model which will classify future customer complaints into ...

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