3
$\begingroup$

If I have a large set of transactions where in each has a set of goods and I want to do market basket analysis (affinity analysis) using Apriori. However, compared to traditional supervised machine learning algorithms like Linear Regression, Random Forests, Gradient Boost, etc there does not appear to be a corresponding methodology where you split into a train and test set, train on the train dataset and check for cross validation on the test set for algorithms such as Apriori. How do you know that your model is truly good? Are there some other metrics that can be used to ensure you are not overfitting your model and that it has no bias?

$\endgroup$
  • 1
    $\begingroup$ My question is about a problem that I am facing in data mining and this does use a machine learning algorithm called Apriori. I am unable to figure out how to do a validation on the association rule mining. $\endgroup$ – Lamba_Jay Sep 17 '18 at 13:35
1
$\begingroup$

Market basket analysis traditionally isn't predictive, it's inferential. It looks in the past to determine what items were bought together, and it makes the assumption that the trends of the past will continue.

Regarding the reliability of the estimates obtained from market basket analysis, it boils down to sample size of the number of base items and co-occurrences that you have.

In theory, one could conduct statistical tests of significance (or construct confidence intervals) around all estimates of support, confidence, and lift to determine if the relationship is real.

In practice, to make sure that enough data is available, focus is usually put on the item sets that have the high support and high lift (not just high lift). Intuitively, this will give you the relationships that are the most likely to be significant, even without statistical testing.

$\endgroup$
  • 1
    $\begingroup$ thanks for explaining this. Also, I have heard that a lift value greater than 1 implies the relationship is better than a random occurrence. What minimum lift ratio would you suggest I should take as yardstick? @Underminer $\endgroup$ – Lamba_Jay Sep 14 '18 at 18:53
  • $\begingroup$ @Lamba_Jay I usually do it by selecting minimum support (say 1000 transactions), then showing (sorting by) the highest lifts to see which ones have the biggest opportunity. If the associations make sense, and there is something actionable that can done to take advantage of the association, those are the ones I would focus on. $\endgroup$ – Underminer Sep 14 '18 at 19:05
  • 1
    $\begingroup$ Sorting by highest value for lift, that makes a lot of sense. Thank you, @Underminer $\endgroup$ – Lamba_Jay Sep 14 '18 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.