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.

Table 5.2. Market basket transactions

Transaction ID Items Bought
1 {Milk, Beer, Diapers}
2 {Bread, Butter, Milk}
3 {Milk, Diapers, Cookies}
4 {Bread, Butter, Cookies}
5 {Beer, Cookies, Diapers}
6 {Milk, Diapers, Bread, Butter, Cheese}
7 {Bread, Butter, Diapers}
8 {Beer, Diapers}
9 {Milk, Diapers, Bread, Butter}
10 {Beer, Cookies}

Answer:

 

 

 

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

Answer:

 

 

 

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

Answer:

 

 

 

 

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

Answer:

 

 

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

Answer:

 

 

  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.

Answer:

 

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

Answer:

 

 

(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.)

Answer:

 

 

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

Answer:

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Military
Very good job
Customer 456821, May 13th, 2022
Health Care
It is exactly my expectation. Thank you.
Customer 454755, June 30th, 2020
English 101
Satisfactory. However, always go through instructions before submitting to identify omissions.
Customer 462843, April 11th, 2022
English 101
Use Premium Grammarly for your edits.
Customer 462833, April 9th, 2022
Law
Commendable.
Customer 456823, April 29th, 2022
Business and administrative studies
Excellent.
Customer 452615, May 23rd, 2022
Social Work and Human Services
Thank you for the revision which was done timely and efficiently!
Customer 452703, January 23rd, 2020
Education
Thanks for pulling this together!!
Customer 463875, April 29th, 2023
Finance
Thank You
Customer 462669, March 11th, 2022
Military
Great.
Customer 456821, June 26th, 2022
Business and administrative studies
Good work.
Customer 458115, April 27th, 2022
Nursing
Excellent work again. Thanks!!!
Customer 453939, March 24th, 2020
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat