Mining frequent sequential patterns with cSPADE
One of the most famous frequent sequential pattern mining algorithms is the SPADE (Sequential PAttern Discovery using Equivalence classes) algorithm, which employs characteristics of the vertical database to perform intersection on ID-list with efficient lattice search and allows us to place constraints on mined sequences. In this recipe, we will demonstrate how to use cSPADE to mine frequent sequential patterns.
Getting ready
In this recipe, one has to have completed the previous recipe by generating transactions with temporal information and have it stored in a variable named traffic.tran
.
How to do it…
Please perform the following steps to mine frequent sequential patterns:
- First, use the
cspade
function ...
Get R for Data Science Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.