Developing a sequence for predicting time and product

I ran into a difficult problem related to sequence processing, for example, I have 10 products, I have millions of records, each of which contains the user, product and timestamp of the purchase. Each user can have only 1 entry or 100 entries. eg:

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 is the best time to promote the product for the user.

So far, my solution has come down to clustering time into several categories. Then apply Apriori to the data, for example, the records will look 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 that do not meet this condition will be discarded.

However, I am not very happy with this decision. Any suggestions?

+6
source share
2 answers

Instead of using Apriori, you can use a sequential pattern search algorithm (for example, PrefixSpan, SPAM, GSP) or a sequential rule algorithm algorithm.

You can check my site for open source Java source code for these algorithms and a few examples:

http://www.philippe-fournier-viger.com/spmf/

Hope this helps,

+2
source

Your problem is the use of the recommendation system, you can learn something from the KDD Cup 2011 . Although the recommended items are music, models can also satisfy your request. And most models take time into account, if you are still not satisfied, you must learn something to analyze time series and machine learning to predict.

0
source

Source: https://habr.com/ru/post/903399/


All Articles