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

Loading the analytics file

If you are still in a session in which OnlineRetail is still in memory, you are OK! However, if you are picking up where we left off, you will need to load the data that we saved in the last session. Start by setting the working directory and then loading the OnlineRetail training dataset:

 

rm(list = ls())setwd("C:/PracticalPredictiveAnalytics/Data")load("OnlineRetail.full.Rda")# works for small dataOnlineRetail <- OnlineRetail[1:10000,]cat(nrow(OnlineRetail), "rows loaded\n") 
> 10000 rows loaded 

The cat function in the previous step should reflect the number of rows in the training data set, which is 268034.

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