• 沒有找到結果。

以減少候選項目組為基礎探勘關聯規則演算法

4. 效能評估

本研究實驗評估前面章節所描述之演算法的 執行效能,實驗平台說明如表2,交易資料由 IBM Data Mining 網站(http://www.almaden.ibm.com/)下 載資料模擬程式,以產生評估實驗中所需要的交易 資料。

itemset1 itemset1 出現次數 frequent1 出現次數

A A 3 A 3

B B 5 B 5

C C 4 C 4

D D 2 E 4

E

掃瞄D1

E 4

2.4

產品項目 交易資料編號 A T1, T3, T6

B T2, T3, T4, T5, T6

C T1, T2, T3, T5

D T1, T6

步驟(1)

E T2, T3, T4, T5

itemset2 出現次數 frequent2 出現次數

AB 2 CB 3

AC 2

2.4

EB 4

AE 1 CE 3

步驟(2)

CB 3

EB 4

CE 3

產品項目 交易資料編號 CB T2, T3, T5

EB T2, T3, T4, T5

步驟(2)

CE T2, T3, T5

itemset3 出現次數 frequent3 出現次數 步驟(4)

CEB 2

2.4

CEB 3

產品項目 交易資料編號 步驟(4)

CEB T2, T3, T5

4-項目組。

圖1 擷取高頻項目組的過程

表2 實驗平台

CPU CPU-Pentium 4 2.4GHz

RAM 512 Mbytes

作業系統 Windows XP Professional SP2

使用語言 C#

CPU CPU-Pentium 4 2.4GHz

文中產生10 個分別包含 10k 筆交易資料的資 料庫,然後依次累加前十個資料庫的交易資料,其 數量分別成為10k, 20k, 30k, …, 100k 的交易資料 庫,並分別以編號D1, D2, D3, D4, D5, D6, D7, D8, D9, D10 表示之,如表 3,做為評估演算法之執行 效能的交易資料庫。交易資料庫中的主要參數值其 意義分別為:n 代表項目的數量、ntran 為交易資 料的數量、np 為型樣組合的數量、tl 為交易資料的 平均項目個數、pl 為高頻項目組的平均長度,其餘

參數以預設值表示之。在探勘計算的過程中設定最 小信賴度為 70%,然後分別評估 FMA 演算法、

progress_Apriori 演算法、及 Apriori 演算法的執行

效能。

表3 交易資料庫與其參數 參數

資料庫 n ntran np tl pl

D1

1000 10k 10000 20 10

D2 1000 20k 10000 20 10

D3 1000 30k 10000 20 10

D4 1000 40k 10000 20 10

D5 1000 50k 10000 20 10

D6 1000 60k 10000 20 10

D7 1000 70k 10000 20 10

D8 1000 80k 10000 20 10

D9 1000 90k 10000 20 10

D10 1000 100k 10000 20 10

圖2 中以交易資料庫 D5 為探勘的資料來源,

分別評估在不同最小支持度的條件下,FMA 演算 法、progress_Apriori 演算法、及 Apriori 演算法的 執行時間。在圖3 中固定最小支持度為 0.015,分 別以交易資料庫D1, D2, D3, D4, D5, D6, D7, D8, D9, D10 為探勘的資料來源,分別評估 FMA 演算 法、progress_Apriori 演算法、及 Apriori 演算法的 執行時間。

交易資料庫D5

0 20 40 60 80 100 120 140

0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 最小支持度

Apriori progress_Apriori FMA

圖2 不同最小支持度的執行時間

最小支持度: 0.015

0 20 40 60 80 100 120 140 160 180

1 2 3 4 5 6 7 8 9 10

交易資料數量(10k)

Apriori progress_Apriori FMA

圖3 不同交易資料數量的執行時間

從以上實驗評估中顯示,文中所提出之 FMA 演算法的執行效能,可以優於 progress_Apriori 演 算法、及Apriori 演算法探勘關聯規則的執行效能。

5. 結論

探勘關聯規則是資料探勘技術中最重要的研 究主題之一,關聯規則可廣泛用於表示項目之間關 聯性的形式,在其探勘過程中必須耗費相當大的計 算時間於交易資料間的搜尋,以判斷項目組是否為 高頻項目組。本研究以交易資料為探勘的資料來 源,設計一個FMA 演算法探勘關聯規則,其先將

交易資料由水平儲存方式調整為垂直儲存方式,往 後只須將兩個組合的高頻項目組其分別出現的交 易資料進行交集運算,並保留交集運算後的交易資 料,如此將可逐漸縮減交易資料的數量。其次利用 progress_Apriori 演算法將高頻項目組中出現次數 最小的項目放置於最前面,當兩個高頻項目組最前 面的項目相同時,才將其兩者組合成候選項目組,

如此組合方式將可避免產生許多重複的候選項目 組。從效能評估中顯示,FMA 演算法的執行效能 優於progress_Apriori 演算法及 Apriori 演算法探勘 關聯規則。

參考文獻

1 陳垂呈、黃聖智、涂剛、姚喬尹、陳宗義,“改 良Apriori 演算法探勘關聯規則”,第三屆資訊科技 應用研討會,中華醫事科技大學,2010 年。

2 R. Agarwal, C. Aggarwal and V. V. V. Prasad, A Tree Projection Algorithm for Generation of Frequent Itemsets, Journal of Parallel and Distributed Computing, 2000, Vol. 63, No. 3, 350-371.

3 R. Agrawal and R. Srikant, Fast Algorithms for Mining Association Rules in Large Database, Proceedings of the 20th International Conference on Very Large Data Bases, 1994, 487-499.

4 R. Agrawal, T. Imielinski and A. Swami, Mining Association Rules between Sets of Items in Very Large Ddatabase, Proceedings of the ACM SIGMOD Conference on Management of Data, 1993, 207-216.

5 M. J. A. Berry and G. S. Linoff, Data Mining Techniques for Marketing, Sales, and Customer Support, 2nd Ed., New York: John Wiley, 2004.

6 F. Coenen, P. Leng and S. Ahmed, Data Structure for Association Rule Mining: T-trees and P-trees, IEEE Transactions on Knowledge and Data Engineering, 2004, Vol. 16, No. 6, 774-778.

7 S. Da Silva Camargo and P. Martins Engel, MiRABIT: a New Algorithm for Mining Association Rules, Proceedings of the 22nd International

Conference of the Chilean Computer Science Society (SCCC'02), 2002, 162-166.

8 J. Han and M. Kamber, Data Mining: Concepts and Techniques, 2nd Ed., Morgan Kaufmann, 2006.

9 J. Han, J. Pei and Y. Yin, Mining Frequent Patterns without Candidate Generation, Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data Table of Contents, 2000, 1-12.

10 J. Han, J. Pei, Y. Yin and R. Mao, Mining Frequent Patterns without Candidate Generation: a Frequent-Pattern Tree Approach, Data Mining and Knowledge Discovery, 2004, Vol. 8, No. 1, 53-87.

11 J. D. Holt and S. M. Chung, Mining Association Rules Using Inverted Hashing and Pruning, Information Processing Letters, 2000, Vol. 83, 211-220.

12 P. Q. Liu, Z. Z. Li and Y. L. Zhao, Effective Algorithm of Mining Frequent Itemsets for Association Rules, Proceedings of the Third International Conference on Machine Learning and Cybernetics, 2004, 1447-1451.

13 Z. C. Li, P. L. He and M. Lei, A High Efficient AprioriTid Algorithm for Mining Association Rule, Proceedings of the Fourth International Conference on Machine Learning and Cybernetics, 2005, 1812-1815.

14 J. S. Park, M. S. Chen and P. S. Yu, Using a Hash-Based Method with Transaction Trimming for Mining Association Rules, IEEE Transactions on Knowledge and Data Engineering, 1997, Vol. 9, No.

5, 813-825.

15 D. C. Pi, X. L. Qin, W. F. Gu and R. Cheng, STBAR: a More Efficient Algorithm for Association Rule Mining, Proceedings of the International Conference on Machine Learning and Cybernetics, 2005, 1529-1533.