Clustering and association rules

User Generated

fnune101089

Computer Science

Description

Association Rules

1.You are given the transaction data shown in the Table below from a fast food restaurant. There are 9 distinct transactions (order:1 – order:9) and each transaction involves between 2 and 4 meal items. There are a total of 5 meal items that are involved in the transactions. For simplicity we assign the meal items short names (M1 – M5) rather than the full descriptive names (e.g., Big Mac).

Meal Item

List of Item IDs

Meal Item

List of Item IDs

Order:1

M1, M2, M5

Order:6

M2, M3

Order:2

M2, M4

Order:7

M1, M3

Order:3

M2, M3

Order:8

M1, M2, M3, M5

Order:4

M1, M2, M4

Order:9

M1, M2, M3

Order:5

M1, M3

For all of the parts below the minimum support is 2/9 (.222) and the minimum confidence is 7/9 (.777). Note that you only need to achieve this level, not exceed it.

a)Apply the Apriori algorithm to the dataset of transactions and identify all frequent k-itemsets. Show all of your work. You must show candidates but can cross them off to show the ones that pass the minimum support threshold.

b)Find all strong association rules of the form: X Y Z and note their confidence values. Hint: the answer is not 0 so you should have at least one frequent 3-frequent itemset.

c)Use a visualization tool to show your data.

--------------------------

Clustering

1.Suppose you want to cluster the eight points shown below using k-means.

Assume that k = 3 and that initially the points are assigned to clusters as follows: C1 = {x1,x2,x3}, C2 ={x4,x5,x6}, C3 ={x7,x8}.

A1 A2

x1 2 10

x2 2 5

x3 8 4

x4 5 8

x5 7 5

x6 6 4

x7 1 2

x8 4 9

a)Apply the k-means functions.

b)Make sure you clearly identify the final clustering and show your steps.

c)Plot the data (show the name of the points in the graph).

Unformatted Attachment Preview

Association Rules 1. You are given the transaction data shown in the Table below from a fast food restaurant. There are 9 distinct transactions (order:1 – order:9) and each transaction involves between 2 and 4 meal items. There are a total of 5 meal items that are involved in the transactions. For simplicity we assign the meal items short names (M1 – M5) rather than the full descriptive names (e.g., Big Mac). Meal Item List of Item IDs Meal Item List of Item IDs Order:1 M1, M2, M5 Order:6 M2, M3 Order:2 M2, M4 Order:7 M1, M3 Order:3 M2, M3 Order:8 M1, M2, M3, M5 Order:4 M1, M2, M4 Order:9 M1, M2, M3 Order:5 M1, M3 For all of the parts below the minimum support is 2/9 (.222) and the minimum confidence is 7/9 (.777). Note that you only need to achieve this level, not exceed it. a) Apply the Apriori algorithm to the dataset of transactions and identify all frequent k-itemsets. Show all of your work. You must show candidates but can cross them off to show the ones that pass the minimum support threshold. b) Find all strong association rules of the form: X ∧ Y ⟶ Z and note their confidence values. Hint: the answer is not 0 so you should have at least one frequent 3-frequent itemset. c) Use a visualization tool to show your data. -------------------------- Clustering 1. Suppose you want to cluster the eight points shown below using k-means. Assume that k = 3 and that initially the points are assigned to clusters as follows: C1 = {x1,x2,x3}, C2 ={x4,x5,x6}, C3 ={x7,x8}. a) Apply the k-means functions. b) Make sure you clearly identify the final clustering and show your steps. c) Plot the data (show the name of the points in the graph).
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Helloo. here is the work. am sorry i kept you long

Association Rules
1. You are given the transaction data shown in the Table below from a fast food restaurant.
There are 9 distinct transactions (order:1 – order:9) and each transaction involves
between 2 and 4 meal items. There are a total of 5 meal items that are involved in the
transactions. For simplicity we assign the meal items short names (M1 – M5) rather than
the full descriptive names (e.g., Big Mac).
Meal Item
List of Item IDs
Meal Item
List of Item IDs
Order:1
M1, M2, M5
Order:6
M2, M3
Order:2
M2, M4
Order:7
M1, M3
Order:3
M2, M3
Order:8
M1, M2, M3, M5
Order:4
M1, M2, M4
Order:9
M1, M2, M3
Order:5
M1, M3
For all of the parts below the minimum suppo...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags