# Questions Assignments

Homework 5

Answer the following questions: (10 point each)

• Consider the data set shown in Table 5.1.

Table 5.1. Example of market basket transactions.

 Customer ID Transaction ID Items Bought 1 0001 {a, d, e} 2 0024 {a, b, c, e} 2 0012 {a, b, d, e} 2 0031 {a, c, d, e} 3 0015 {b, c, e} 3 0022 {b, d, e} 3 0029 {c, d} 4 0040 {a, b, c} 5 0033 {a, d, e}

• Compute the support for item sets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket.

S({c})              =

S({e, d})         =

S({a, b, d})     =

S({c, d})         =

• Use the results in part (a) to compute the confidence for the association

rules {b, d} à {e} and {e} à {b, d}. Is confidence a symmetric measure?

c(bd à e) =

c(e à bd)  =

1. Consider the market basket transactions shown in Table 5.2.

• What is the maximum size of frequent item sets that can be extracted (assuming minusup > 0)?

• Write an expression for the maximum number of size-3 itemsets that can be derived from this data set.

• Find an itemset (of size 2 or larger) that has the largest support.

• Find a pair of items, a and b, such that the rules {a} → {b} and {b} → {a} have the same confidence.

1. The Apriori algorithm uses a generate-and-count strategy for deriving frequent itemsets. Candidate itemsets of size k+1 are created by joining a pair of frequent itemsets of size k (this is known as the candidate generation step). A candidate is discarded if any one of its subsets is found to be infrequent during the candidate pruning step. Suppose the Apriori algorithm is applied to the data set shown in Table 5.3 with minsup = 30%, i.e., any itemset occurring in less than 3 transactions is considered to be infrequent.

Table 5.3. Example of market basket transactions.

 Transaction ID Items Bought 1 {a, b, c} 2 {b, c, d} 3 {a, b, d} 4 {a, c, d} 5 {b, c} 6 {c, d} 7 {c} 8 {a, b, c} 9 {a, d} 10 {b, d}

(a) Draw an itemset lattice representing the data set given in Table 5.3.

Label each node in the lattice with the following letter(s):

• N: If the itemset is not considered to be a candidate itemset by the Apriori algorithm. There are two reasons for an itemset not to be considered as a candidate itemset: (1) it is not generated at all during the candidate generation step, or (2) it is generated during the candidate generation step but is subsequently removed during the candidate pruning step because one of its subsets is found to be infrequent.
• F: If the candidate itemset is found to be frequent by the Apriori algorithm.
• I: If the candidate itemset is found to be infrequent after support counting.

(b) What is the percentage of frequent itemsets (with respect to all itemsets in the lattice)?

(c) What is the pruning ratio of the Apriori algorithm on this data set? (Pruning ratio is defined as the percentage of itemsets not considered to be a candidate because (1) they are not generated during candidate generation or (2) they are pruned during the candidate pruning step.)

(d) What is the false alarm rate (i.e, percentage of candidate itemsets that are found to be infrequent after performing support counting)?

Our Basic features
• Free title page and bibliography
• Plagiarism-free guarantee
• Unlimited revisions
• Money-back guarantee
Our Options
• Writer’s samples
• Overnight delivery
• Part-by-part delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our customer is the center of what we do and thus we offer 100% original essays..
By ordering our essays, you are guaranteed the best quality through our qualified experts.All your information and everything that you do on our website is kept completely confidential.

### Money-back guarantee

Academicwritingcompany.com always strives to give you the best of its services. As a custom essay writing service, we are 100% sure of our services. That is why we ensure that our guarantee of money-back stands, always

### Zero-plagiarism tolerance guarantee

The paper that you order at academicwritingcompany.com is 100% original. We ensure that regardless of the position you are, be it with urgent deadlines or hard essays, we give you a paper that is free of plagiarism. We even check our orders with the most advanced anti-plagiarism software in the industry.

### Free-revision guarantee

The Academicwritingcompany.com thrives on excellence and thus we help ensure the Customer’s total satisfaction with the completed Order.To do so, we provide a Free Revision policy as a courtesy service. To receive free revision the Academic writing Company requires that the you provide the request within Fifteen (14) days since the completion date and within a period of thirty (30) days for dissertations and research papers.

### Privacy and Security policy

With Academicwritingcompan.com, your privacy is the most important aspect. First, the academic writing company will never resell your personal information, which include credit cards, to any third party. Not even your lecturer on institution will know that you bought an essay from our academic writing company.