• 沒有找到結果。

階層式的料理自動分類

第四章 實驗

4.8 階層式的料理自動分類

立 政 治 大 學

Na tiona

l Ch engchi University

對照圖 4-58,Yummly.com 以 RandomForest 演算法分類產生之 Confusion Matrix,義式、法及西班牙料理相近,而印度料理和摩洛哥料理相近,中式、泰 式及日式料理相近。

圖 4-59 Yummly.com 以 RandomForest 分類產生之 Confusion Matrix

4.8 階層式的料理自動分類

本節以中式、泰式、義式及西班牙四類料理進行階層式分類,根據前一節 料理以相似度分群結果,我們將中式及泰式料理歸為相近之一群,義式及西班牙 料理為另一群,並且針對這四種類理類別建立三個不同的 SVM 分類器(參考圖 4-59 及圖 4-60)。第一層分類器由四種料理食譜資料訓練而成,將食譜自動分類 為二類:中、泰或義、西。第二層分類器各由二類料理食譜訓練而成,其一將食 譜自動分類為中式或泰式料理,另一個分類器將食譜分為義式或西班牙料理。

中式、泰式、義式及西班牙各取 600 筆食譜,以 5-Fold 交叉驗證求分類平 均準確率,每回合隨機取四類料理各 480 筆食譜為訓練資料,並以各類料理剩餘 之 120 筆食譜為測試資料,測試分類器準確率。

第一層分類器

‧ 國

立 政 治 大 學

Na tiona

l Ch engchi University

圖 4-61 第二層料理分類示意圖

實驗顯示第一層分類器之平均準確率為 0.9687,而整體平均準確率為 0.8704

(參考表 4-32),均較平面式分類器平均準確率 0.85833 高(參考圖 4-63)。

表 4-32 四類料理階層式分群各回合準確率

第一層準確率 整體準確率

第一回 0.9750 0.8813

第二回 0.9604 0.8438

第三回 0.9792 0.8938

第四回 0.9667 0.8750

第五回 0.9625 0.8583

五回平均 0.9687 0.8704

第一層分類器

第二層分類器 第二層分類器

中式料理 泰式料理 義式料理 西班牙料理

‧ 國

立 政 治 大 學

Na tiona

l Ch engchi University

第五章

結論與未來研究方向

5.1 結論

本論文係針對由知名食譜網站取得之大量資料,利用資料探勘的技術,先進 行同義詞轉換之實驗,同義詞的來源除由知名食物的百科全書網站擷取外,更嘗 試由食材本身產生同義詞,其一是利用食譜網站賦予同義食材相同食材編號的特 性,以歸納同義異名食材;另一個方法則是利用自然語言處理的技術,將每個食 材名稱轉換為詞袋,詞袋內是不分順序且具有意義的單詞原形,經由比對詞袋內 的單詞,產生由食材名稱本身衍生的同義詞,實驗結果顯示經同義詞處理後,食 材數量變少,且食譜自動分類準確率略有提高。

利用標示料理類別的食譜,本實驗進行了料理類別的探索,本研究提出之探 勘特色食材方法找到了有別於常用食材的食材樣式,這些特色食材符合我們對料 理類別的認知,證明這個方法是有效的。這個方法可以幫助我們去探索不熟悉的 料理,快速找到陌生料理類別的經常或特殊食材樣式。

從對食譜進行料理類別的自動分類及相似度分群實驗中,我們得到料理類別 間的親疏訊息,這些跨越天然地理界限的相似料理類別,有著背後歷史淵源,說 明我們實驗建立的分類及分群的方法的有效性。最後,我們進行以往研究較少使 用的階層式分類,除了提高分類準確率的目標外,階層式分類上層分類器準確率 會高於底層分類器,階層式分類的好處是可依不同需求選擇中間層或底層分類

‧ 國

立 政 治 大 學

Na tiona

l Ch engchi University

5.2 未來研究方向

我們處理同義詞的過程中,發現了食譜網站在歸納同義食材的不一致問題。

此外,尋找同義詞引發我們對食材相似性的研究興趣,未來將探索食譜及食材相 似性,期能自動算出替代性食材,或經由分析食材的相似性及異質性,提昇現有 食譜之風味,甚而能自動計算出美味佳餚。

快速成長的食譜網站資訊有助於利用資訊探勘技術及和網絡分析方法進行 研究,這些研究可以幫助我們了解人類對食物的感官知覺,產生對食物的新見 解,創造新的料理風貌。在過去的二十年間資料科學數據分析,如基因研究,已 經徹底改變了生物科學,食品科學很可能是下一個因 big data 研究的受益者之 一,可以讓美味經由計算自動產生。

Miningssociation Rules, International Conference on Very Large Data Bases, VLDB, 1994.

[2] Yong Yeo. Ahn, Sebastian E. Ahnert, James P. Bagrow, and Albert László Barabasi, Flavor Network and the Principles of Food Pairing, Scientific Reports, Vol.1, 2011.

[3] Florian Beil, Martin Ester, and Xiaowei Xu, Frequent Term-based Text Clustering. ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2002.

[4] Steven Bird, Klein Ewan, and Edward Loper. Natural Language Processing with Python, O'Reilly Media, Inc., 2009.

[5] Stephen P. Borgatti, Centrality and Network Flow, Social Networks, Vol. 27 No.1, 2005.

[6] Corrado Boscarino, N. J. Koenderink, V. Nedović, and J. L. Top, Automatic extraction of ingredient's substitutes. ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct Publication. ACM, 2014.

[7] L. Breiman, Random Forests, Machine Learning, Vol. 45, 2001.

[8] Thomas H. Cormen, Clifford Stein, Ronald L. Rivest, and Charles E. Leiserson, Introduction to Algorithms (the 2nd Edition), McGraw-Hill, 2001.

[9] Karam Gouda and Mohammed Zaki, Efficiently Mining Maximal Frequent Itemsets, IEEE International Conference on Data Mining, 2001.

[10] Jaiwei Han and Micheline Kamber, Data Mining: Concepts and Techniques, Morgan Kaufmann Publishers, 2001.

[11] Anna Huang, Similarity Measures for Text Document Clustering, Sixth New Zealand Computer Science Research Student Conference, Christchurch, New Zealand, 2008.

[12] James Manyika, Michael Chui, Brad Brown, Jacques Bughin, Richard Dobbs, Charles Roxburgh, and Angela H. Byers, Big Data: the Next Frontier for Innovation, Competition, and Productivity, McKinsey & Company, 2011.

[13] Rada Mihalcea, Courteny Corley, and Carlo Strapparava, Corpus-based and

[15] Tore Opsahl, Filip Agneessens, and John Skvoretz, Node Centrality in Weighted Networks: Generalizing Degree and Shortest Paths, Social Networks Vol. 32, 2010.

[16] J. R. Quinlan, C4.5: Programs for Machine Learning, Morgan Kaufmann Publishers, 1993.

[17] Carlos N. Silla Jr., and Alex A. Freitas, A Survey of Hierarchical Classification across Different Application Domains, Data Mining and Knowledge Discovery, Vol. 22, 2011.

[18] Han Su, Ting-Wei Lin, Cheng-Te Li, Man-Kwan Shan, and Janet Chang, Automatic Recipe Cuisine Classification by Ingredients, ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct Publication, 2014.

[19] Aixin Sun, Ee-Peng Lim, and Wee-Keong Ng, Performance Measurement Framework for Hierarchical Text Classification, Journal of the American Society for Information Science and Technology, Vol. 54, 2003.

[20] Chun-Yuen Teng, Yu-Ru Lin, and Lada A. Adamic, Recipe Recommendation Using Ingredient Networks, ACM Web Science Conference, 2012.

[21] Kristin M. Tolle, D. Stewart W. Tansley, and Anthony J. Hey, The fourth paradigm: Data-intensive scientific discovery [point of view]. IEEE, Vol. 99, 2011.

[22] Lav R. Varshney, Florian Pinel, Kush R. Varshney, Debarun Bhattacharjya, Angela Schörgendorfer, and Yi-Min Chee, A Big Data Approach to Computational Creativity, arXiv preprint arXiv1311.1213 (2013).

[23] Kush R. Varshney, Lav R. Varshney, Jun Wang, and Daniel Myers, Flavor Pairing in Medieval European Cuisine: A study in Cooking with Dirty Data, International Joint Conference on Artificial Intelligence Workshops, 2013.

[24] Liping Wang, Qing Li, Na Li, Guozhu Dong, and Yu Yang, Substructure Similarity Measurement in Chinese Recipes. International Conference on World Wide Web, 2008.

[25] Yan Xu, Gareth Jones, JinTao Li, Bin Wang, and ChunMing Sun, A Study on Mutual Information-Based Feature Selection for Text Categorization, Journal of Computational Information Systems, Vol. 3, 2007.

[26] Gephi in https://gePhi.org

[27] Libsvm :http://www.csie.ntu.edu.tw/~cjlin/libsvm/

[28] Phi wiki introduction, retrieved June 20 2015 from the World Wide Web https://en.wikipedia.org/wiki/Phi.

[29] Stanford Parser. http://nlp.stanford.edu/software/lex-parser

[30] SVM wiki introduction, retrieved June 18 2015 from the World Wide Web https://en.wikipedia.org/wiki/Support_vector_machine

‧ 國

立 政 治 大 學

Na tiona

l Ch engchi University

[31] Weka: http://www.cs.waikato.ac.nz/ml/weka/