100 items 100 baskets divisor association analysis problem

I have the following exercise question:

Suppose there are 100 items, numbered 1 to 100, and also 100 baskets, also numbered 1 to 100. Item i is in basket b if and only if i divides b with no remainder. Thus, item 1 is in all the baskets, item 2 is in all fifty of the even-numbered baskets, etc. for example Basket 12 consists of items {1, 2, 3, 4, 6, 12}

Given this, I'm trying to solve the following 3 questions:

(a) If the support threshold is 5, which items are frequent?

(b) what is the confidence of the following association rules?

(1) {5, 7} → 2.

(2) {2, 3, 4}→ 5.

which way I should be approaching these types of questions?

Topic market-basket-analysis data-mining

Category Data Science


a) The items that are frequent are $\{1,2,3,4,5,\dots,20\}$ because these all appear in at least 5 baskets.

b)

(1) $\{5, 7\} → 2$. Then $Confidence=\frac{1}{2}$

hence 5 and 7 will appear together in basket no. 35 and 70 and 2 will appear along with 7 and 5 in basket no. 70 so:

$$ Confidence = \frac{support(\{5,7\}\cup\{2\})}{support(\{5,7\})}= \frac{1}{2} $$

(2) $\{2, 3, 4\}→ 5$. Then $Confidence=\frac{1}{8} $

$\{2,3,4\}$ appear in baskets having basket number multiple of 12 ($LCM\{2,3,4\}$) i.e in basket no $\{12,24,...,60,.....,96\}$ and $\{2,3,4,5\}$ appear together only in basket no 60.

$→ Confidence=\frac{1}{8}$

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.