0 votes
1 view
in AI and Deep Learning by (44.6k points)

I am facing a tricky problem about sequence mining, say I have 10 products, I have millions of records each containing user, product and timestamp of purchase. Each user may have only 1 record or 100 records.. such as :

user 1, p1, t1

user 1, p1, t2

user 1, p2, t3

user 1, p3, t4

user 1, p1, t5

user 2, p2, t6.....

Now I need to predict when it's the best time to promote a product for a user.

So far, my solution is, clustering the time into a few categories. Then apply Apriori on the data, e.g the records will be like

user 1, p1T1

user 1, p2T2

user 1, p3T2

user 1, p2T1...

Then I will get rules like p1T1->p2T2 etc because T3>T2>T1... any rules do not fit this condition will be discarded.

However, I am not very satisfied with this solution. Any suggestions?

1 Answer

0 votes
by (96.7k points)

Instead of implementing Apriori, you could apply a sequential pattern mining algorithm (e.g. PrefixSpan, SPAM, GSP) or you can also use a sequential rule mining algorithm.

There are two steps to perform sequence prediction:

  1. First,  one needs to train a sequence prediction model using some previously seen sequences called the training sequences.  This process is illustrated below:seq_model.

image

For example, anyone could train a sequence prediction model for webpage prediction using the sequences of webpages visited by several users.

  1. The second step is to utilize a trained sequence prediction model to perform prediction for new sequences (i.e. predict the next symbol of a new sequence), as illustrated below.seq_model2

image

For example, using a prediction model trained with the sequences of webpages visited by several users, one may predict the next webpage visited by a new user.

You can refer to these links for better understanding:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...