Skip to Content
Practical Predictive Analytics
book

Practical Predictive Analytics

by Ralph Winters
June 2017
Beginner to intermediate
576 pages
15h 22m
English
Packt Publishing
Content preview from Practical Predictive Analytics

Support vector machines (SVM)

Support vector machines (SVM) can also be used to predict a binary class. SVM projects the data into a higher dimensional space so that hyperplanes can be used to separate the classifiers. SVMs can be very accurate but difficult to interpret and computationally expensive. They are a classic example of a low bias algorithm.

Here is a simple example of using an SVM to predict whether a person is satisfied based upon the day of the week and whether or not it is a payday. (The vector element is marked as 1 in the payday vector, which can be interpreted as Friday if you start counting from Sunday.)

library(e1071) satisfied = factor(c(F,F,F,F,F,T,F)) day = c(1,2,3,4,5,6,7) payday = c(0,0,0,0,0,1,0) satisfaction.df ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Superstream: Analytics Engineering

Data Superstream: Analytics Engineering

Alistair Croll, Anna Filippova, Emilie Schario, Lewis Davies, Jacob Frackson, Benn Stancil, Nick Acosta, Elizabeth Caley
R: Predictive Analysis

R: Predictive Analysis

Tony Fischetti, Eric Mayor, Rui Miguel Forte
Python: Advanced Predictive Analytics

Python: Advanced Predictive Analytics

Ashish Kumar, Joseph Babcock

Publisher Resources

ISBN: 9781785886188Supplemental Content