Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

lOMoARcPSD|20279237

Bai Luyen Tap Data Mining

Data mining (Trường Đại học Kinh tế – Luật, Đại học Quốc gia Thành phố Hồ Chí Minh)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by tran thanh nam (nellyct87@gmail.com)
lOMoARcPSD|20279237

DATA MINING – PRACTICE

Exercise 1 Calculate Recall, Precision, F1-score.


TP FP FN TN
200 300 400 500

Exercise 2 Given a transaction database below.


Transaction ID Items

1 T, N, F, N, J
2 U, F, G, H, P, Q
3 Z, N, G, H, I
4 W, E, I
5 W, E, F, K
6 P, U, F

2a. Use the Apriori algorithm to find all frequent itemsets with minsup = 2.
2b. Use the FP-Growth algorithm to generate a final FP-Tree and find rules created by 3 items
Exercise 3 Use single link agglomerative clustering to group the data described by the following
distance matrix. Show the dendrogram.
A B C D E F G
A 0 150 72 26 100 104 130
0 74 36 150 34 20
B
0 50 4 14 106
C
0 26 34 104
D
0 24 190
E
0 158
F
0
G

Downloaded by tran thanh nam (nellyct87@gmail.com)


lOMoARcPSD|20279237

Exercise 4 Given a document, drawn from a collection of 80000 documents, in which the 5 terms
given in the table below occur, calculate the TFIDF values for each one. Which term accounts for
the lowest TFIDF value?
Term Frequency in current document Number of documents containing term

Bird 80 1000

Tiger 40 1500

Eagle 820 1240

Dophin 340 1380

Bear 860 1400

Exercise 5. Give information about a Neural network as below.

Neural Network for Task 5


Initial Weights

Link from node Link to node Weight


inp1 hid1 0.15
inp1 hid2 -0.25
inp1 hid3 0.15
inp2 hid1 0.25

Downloaded by tran thanh nam (nellyct87@gmail.com)


lOMoARcPSD|20279237

inp2 hid2 0.25


inp2 hid3 -0.25
hid1 out1 -0.45
hid1 out2 -0.25
hid2 out1 0.15
hid2 out2 0.25
hid3 out1 -0.25
hid3 out2 0.45

Bias Weights
Layer Value
Hidden -0.35
Output 0.25

Initial Training Instance


Input value Target value
input1 input2 output1 output2
2.25 -2.5 0.25 -0.125

Calculate the Sum Squared Error (to 5 decimal places)

Downloaded by tran thanh nam (nellyct87@gmail.com)

You might also like