Question: This is Q1-c for reference. c. The following dataset contains 7 transactions of 6 items: apple, bread, carrot, donut, egg, and fish. Calculate (i) support(

This is Q1-c for reference.

This is Q1-c for reference. c. The following dataset contains 7 transactions

of 6 items: apple, bread, carrot, donut, egg, and fish. Calculate (i)

c. The following dataset contains 7 transactions of 6 items: apple, bread, carrot, donut, egg, and fish. Calculate (i) support( apple } ), (ii) support( { donut } ), (iii) support( apple }=> donut } ), and (iv) confidence( { apple }=>{ donut } ). (Note that this dataset is also used in some later questions.) [5] - T0: apple, bread, egg, fish - T1: apple, bread, carrot, donut, egg - T2: bread, egg - T3: bread, donut, egg - T4: apple, bread, egg - T5: apple, bread, egg, fish - T6: apple, carrot, donut, egg Question 3 - Programming PCA and Apriori [25 marks] a. Given a dataset created from the code fragment below, write code to apply PCA and linear regression on the dataset for various numbers of principal components, and plot the test scores and total variance explained ratios versus the number of principal components used. Do not use cross-validation. [12] from sklearn.datasets import make_regression x,y= make_regression(n_samples =500, n_features =30, n informative =20, effective_rank =10, noise =4, tail_strength =0.1, random_state =42 ) b. Write code to visualise the dataset in part (a) in a scatter plot using the first two principal components. Show the first principal component in the x-axis, the second principal component in the y-axis, and the target values in colours with the "bwr" Matplotlib colormap. [5] c. Write code to apply Apriori to the dataset in Q1-c for the minimum support value of 0.4. Display the support values and the contents of the frequent itemsets

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!