O'Reilly logo

Mastering Machine Learning with R - Second Edition by Cory Lesmeister

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

Sequential analysis applied

For this exercise, I've created an artificial dataset; to follow along, you can download it from GitHub:

https://github.com/datameister66/data/blob/master/sequential.csv

There are also datasets available with the package and tutorials are available. My intent was to create something new that mirrored situations I have encountered. I developed it completely from random (with some supervision), so it does not match any real world data. It consists of 5,000 observations, with each observation, the history of a customer and nine variables:

  • Cust_segment--a factor variable indicating the customer's assigned segment (see Chapter 8, Cluster Analysis)
  • Eight discrete purchase events named Purchase1 through Purchase8

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