none
Market Basket with Azure Machine Learning RRS feed

  • Question

  • Hi All,

    I am trying to figure out how to make something similar with the good old Data Mining Market Basket scenario (https://docs.microsoft.com/en-us/sql/tutorials/lesson-3-building-a-market-basket-scenario-intermediate-data-mining-tutorial?view=sql-server-2014). I need product recommendations based on customer attributes as well as historic purchase of products.

    I did a lot of research on the web and couldn't find suitable sample solution. I thought the matchbox will do the trick, but it seems it cannot be used for predictions for non existing customers. 

    What is the easiest / most efficient way to implement the aforementioned scenario with current AML technology, preferably utilizing AML Studio? 

    Sunday, February 9, 2020 9:19 PM

All replies

  • I am wondering if the following scenario could work. Prepare the training data in the following format:

    orderid, productid, customer_age, customer_gender, customer_education, customer_income

    1, 1, 20-30, M, Graduate, Above-100-K

    2, 2, 20-30, M, Graduate, Above-100-K

    3, 1, 30-40, F, Undergraduate, Above-100-K

    ....

    Then train a classification model, e.g. Multiclass Logistics Regression. Then do predictions based on customer_age, customer_gender, customer_education and customer_income and select top 5 labels by highest probability and use as recommendation.

    I guess I won't be able to detect the associations between products :( 

    Any thoughts?


    Monday, February 10, 2020 1:19 PM
  • Hi,

    Thanks for reaching out. Here’s a good example from the Azure AI Gallery for discovering Association Rules using Azure ML Studio (Classic). Hope this helps. Thanks.

     

      

     

    Regards,

    GiftA-MSFT.

    If a post helps to resolve your issue, please click “Mark as Answer” and/or “Vote as helpful”. By marking a post as Answered and/or Helpful, you help others find the answer faster.  Thanks.

    Monday, February 10, 2020 6:06 PM
    Moderator
  • Hi,

    I saw this example, but I don't quite get it. It seems that it can either discover association rules between customer attributes or items, but not both combined. BTW I ran the experiment and set up web service. It throws an error, regardless of the value for income specified in the input:

    Microsoft.MetaAnalytics.DllModuleHost.DataLab.RuntimeModule (RPackage) : The following error occurred during evaluation of R script: R_tryEval: return error: Error in asMethod(object) : income=>50K is an unknown item label

    Monday, February 10, 2020 9:04 PM
  • Hi,

    For the Discover Association Rules module, you can only specify one return type at a time. Also, the reason for the error is because ‘income=>50K, income=<=50K’ is specified in the Right-Hand-Side parameter. Using the ‘Request-Response’ feature may not work because it expects input containing both income values. Hence, I suggest you use excel for consuming the web service as shown below, or use the API for consuming the web service. Hope this helps. Thanks.

     

     

    Regards,

    GiftA-MSFT.

    If a post helps to resolve your issue, please click “Mark as Answer” and/or “Vote as helpful”. By marking a post as Answered and/or Helpful, you help others find the answer faster.  Thanks.

    Wednesday, February 12, 2020 12:01 AM
    Moderator