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?
Once trained, the model is used to perform sequence predictions. A prediction consists in predicting the next items of a sequence. This task has numerous applications such as web page prefetching, consumer product recommendation, weather forecasting and stock market prediction.
Sequence prediction is a popular machine learning task, which consists of predicting the next symbol(s) based on the previously observed sequence of symbols. These symbols could be a number, an alphabet, a word, an event, or an object like a webpage or product. For example: A sequence of words or characters in a text.
Sequential pattern mining is the mining of frequently appearing series events or subsequences as patterns. An instance of a sequential pattern is users who purchase a Canon digital camera are to purchase an HP color printer within a month.
The Time Series mining function provides algorithms that are based on different underlying model assumptions with several parameters. The learning algorithms try to find the best model and the best parameter values for the given data. If you do not specify a seasonal cycle, it is automatically determined.
Instead of applying Apriori, you could apply a sequential pattern mining algorithm (e.g. PrefixSpan, SPAM, GSP) or a sequential rule mining algorithm.
You can check my website for open-source Java source code for these algorithms and some examples:
http://www.philippe-fournier-viger.com/spmf/
Hope this helps,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With