Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are given four items, namely A, B, C, and D. Their corresponding unit profits are pA, pB, PC, and PD. The following shows five

image text in transcribed

We are given four items, namely A, B, C, and D. Their corresponding unit profits are pA, pB, PC, and PD. The following shows five transactions with these items. Each row corresponds to a transaction where a non-negative integer shown in the row corresponds to the total number of occurrences of the correspondence item present in the transactionn T ABCD t2 3400 t0013 5 The frequency of an itemset in a row is defined to be the minimum of the number of occurrences of all items in the itemset. For example, itemset C, D in the first row has frequency equals 2. But itemset C, D in the third row has frequency as 1 The frequency of an itemset in the dataset is defined to be the sum of the frequencies of the itemset in all rows in the dataset. For example, itemset {C, D) has frequency 2+0+1+3+0-6 Let f be a function defined on an itemset s( w be specified later). One example of this functions is f(s)-EsPi. In this example, if s = {C, D), then f(s) = pc +PD . The profit of an itemset s in the dataset is defined to be the product of the frequency of this itemset in the dataset and f(s). For example, itemset {C,D) has profit 6 f((C, D)) Answer the following two questions based on the above problem setting Question 1 5 marks Assume f(, where lsl is the size of s. Suppose that we know pA - 10, P 10 PC 10, and PD adapted to find these itemsets? If yes, please write down the pseudo-code and illustrate it with the above example. If no, please explain why. In this case, please also design an algorithm for this problem and write down the pseudo-code 10. We want to find all itemsets with profit at least 50. Can the Apriori Algorithm be Question 2. [5 marks] Assume f(s)-Es Pi. Suppose that we know PA-5, PB = 10, PC-6, and PD-4, we want to find all itemsets with profit at least 50. Can the Apriori Algorithm be adapted to find these itemsets? If yes, please write down the pseudo-code and illustrate it with the above example. If no, please explain why In this case, please also design an algorithm for this problem and write down the pseudo-code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe at least 3 ways in which investors can use stock options.

Answered: 1 week ago

Question

Distinguish between formal and informal reports.

Answered: 1 week ago