Using Rapidminer to predict next product basket

e18beatricec
e18beatricec New Altair Community Member
edited November 5 in Community Q&A
Hi, how can I use Rapidminer to predict which items will be in each customer's next purchase? I have data on the past orders for each customer. I would like to get as a result a list or group of items that will be purchased next, for each customer.
I don't think I can use decision trees because this is not a binomial prediction. I don't think I can use association rule mining either because that tells what products that are purchased together, not those that will be purchased next. What can I do then?

Answers

  • M_Martin
    M_Martin New Altair Community Member
    Your approach will likely be influenced by your source data.  If your transactional data model includes a sequence number (i.e. an indicator that specifies the order in which a product was selected within a transaction) your solution model can be structured to answer the question "give that product P was selected in numeric sequence N, within transaction T, which P product should be recommended to occupy place number N + 1 within the transaction?  You can also consider whether or not to apply business rules as part of recommending the next product in the transaction sequence, or if the recommendation will only be based on previous product selections by customers, or a combination of both approaches.  If you are capturing on-line sales, your e-commerce software platform would likely be able to capture the product selection sequence within transactions via the normal logging of the clickstream.
     
    If your available data does not contain any information that specifies the product sequence selection within a transaction, you will likely need to consider other approaches to emulate product sequence selection within a transaction - or start by first tracking which products are purchased together (which you can do very nicely in RapidMiner) - and gradually build a knowledge base as to the sequence in which products were purchased within transactions by soliciting input from selected customers. 

    Hope this has been helpful and best wishes, Michael Martin  
  • rfuentealba
    rfuentealba New Altair Community Member
    Hi @e18beatricec,

    I agree with @M_Martin. I have much less experience than him in this kind of stuff (and many others), but some ideas might help you.

    There are many things to consider:
    • Are there temporal patterns you can predict? e.g., I buy sugar once every three months, peanut butter once every month, eggs once every two weeks, and a cake on my daughter's birthday every year. If that's the case, perhaps time series analysis can help you.
    • Are there seasonality patterns? e.g., I buy flour and butter in winter, as there is a traditional fried pastry that's often made in rainy days in my country. If that's the case, decision trees would be helpful.
    • If you are trying to predict on a single purchase: if someone buys a hammer, then nails and pieces of wood are often associated (meant to be purchased together, just not in the same visit to the store).
    Hope this helps,

    Rodrigo.