Home
Discussions
Community Q&A
Basket Analysis
Anoon
Hello
I'm trying to do some exercises on Market Basket Analysis, but I couldn't figure out how to analyze the products per month (seasonal analyzing). Maybe someone can help on this.
Thanks, Anoon
Find more posts tagged with
AI Studio
Market Basket Analysis
Accepted answers
jacobcybulski
You will need to define your "basket" first! Is it a month in a given year? Or, is the same month in 2019 and 2020 different baskets? Or perhaps, a basket are all products purchased by a customer in different months? There are many more possibilities of course, it all depends on your problem. Once you know what is your basket, you can then aggregate your sales into such basket-groups and apply the association analysis.
jacobcybulski
In this case you already have the representation suitable for market basket analysis.
Now we have two choices depending on your business objective. One to aggregate and perform the analysis of all transactions month-by-month, if your question is to do with demand on your products (what products are being ordered monthly). The second is to perform market basket analysis month-by-month, if your question is to do with giving recommendation to customers for purchasing additional products in a given month (what products may be suitable in a given month). I assume the latter fits better the purpose of market basket analysis.
In the latter case, what is needed is to filter all transactions for a specific month irrespectively of year, day or time. To do this you may need to replace your date-time with its month component using Date to Numerical operator, and then use Filter Examples for each month 1 (Jan), 2 (Feb), ..., as required, before undertaking the FP Growth and Association Analysis. It seems like a lot of work but you will be able to extract the MBA rules of use to the company month-to-moth marketing of products. You may find that in some months, depending on your support and confidence, you will get only a few rules (e.g. during the summer holidays) and in other months lots of rules (e.g. around Christmas time). If monthly analysis seems like a lot of hard work (12 separate MBA analysis sessions), you can use a quarterly MBA analysis.
All comments
jacobcybulski
You will need to define your "basket" first! Is it a month in a given year? Or, is the same month in 2019 and 2020 different baskets? Or perhaps, a basket are all products purchased by a customer in different months? There are many more possibilities of course, it all depends on your problem. Once you know what is your basket, you can then aggregate your sales into such basket-groups and apply the association analysis.
Anoon
Hi Jacobcybulski
Thanks for you answer. Can please show me in steps how can I do that. My data set is vectorized columns out 3500 cashier transaction There only date column and the rest are products columns.
jacobcybulski
Do you mean: date and time, product code/name, quantity, price?
Anoon
The columns are : Inovice# -> Date(date/time) -> product1 ->product2 .... tuntil product420.
In the data set there is no quantities, prices or product code.
jacobcybulski
In this case you already have the representation suitable for market basket analysis.
Now we have two choices depending on your business objective. One to aggregate and perform the analysis of all transactions month-by-month, if your question is to do with demand on your products (what products are being ordered monthly). The second is to perform market basket analysis month-by-month, if your question is to do with giving recommendation to customers for purchasing additional products in a given month (what products may be suitable in a given month). I assume the latter fits better the purpose of market basket analysis.
In the latter case, what is needed is to filter all transactions for a specific month irrespectively of year, day or time. To do this you may need to replace your date-time with its month component using Date to Numerical operator, and then use Filter Examples for each month 1 (Jan), 2 (Feb), ..., as required, before undertaking the FP Growth and Association Analysis. It seems like a lot of work but you will be able to extract the MBA rules of use to the company month-to-moth marketing of products. You may find that in some months, depending on your support and confidence, you will get only a few rules (e.g. during the summer holidays) and in other months lots of rules (e.g. around Christmas time). If monthly analysis seems like a lot of hard work (12 separate MBA analysis sessions), you can use a quarterly MBA analysis.
Anoon
Hi Jacobybulski,
Thanks your very much for this very nice an useful explanation. Really I appreciate your effort in this answer. Thanks again.
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)