• 沒有找到結果。

第五章 結論與未來展望

5.2 未來展望

對部分分類器將造成負擔,如 SVM 與 KNN。然而特徵的降維(dimension reduction) 可以從特徵篩選(feature selection)中達成。其透過資料前處理,過濾掉重複或者與

[1] D. Gayo-Avello, P. T. Metaxas and E. Mustafaraj, “Limits of Electoral Predictions using Twitter,” Proceedings of the International Conference on Weblogs and Social Media

(ICWSM’11), 2011.

[2] A. Boutet, H. Kim, and E. Yoneki, “What’s in Your Tweets? I Know Who You Supported in the UK 2010 General Election,” Proceedings of the International Conference on Weblogs and Social Media (ICWSM’12), 2012.

[3] 結合長詞優先與序列標記之中文斷詞研究 林千翔∗、張嘉惠*、陳貞伶∗

Computational Linguistics and Chinese Language Processing Vol. 15, No. 3-4, September/December 2010, pp. 161-180

[4] Chen, K.J. & Ming-Hong Bai, "Unknown Word Detection for Chinese by a

Corpus-based Learning Method," International Journal of Computational linguistics and Chinese Language Processing, 1998, Vol.3, #1, pages 27-44 [PS]

[5]Chen, Keh-Jiann, and Wei-Yun Ma. "Unknown word extraction for Chinese documents."

Proceedings of the 19th international conference on Computational linguistics-Volume 1.

Association for Computational Linguistics, 2002.

[6]Ma, Wei-Yun, and Keh-Jiann Chen. "A bottom-up merging algorithm for Chinese unknown word extraction." Proceedings of the second SIGHAN workshop on Chinese language processing-Volume 17. Association for Computational Linguistics, 2003.

[7] B. O’Connor, R. Balasubramanyan, B. R. Routledge, and N. A. Smith, “From Tweets to Polls: Linking Text Sentiment to Public Opinion Time Series,” Proceedings of the

International Conference on Weblogs and Social Media (ICWSM’10), 2010.

[8] A. Tumasjan, T. O. Sprenger, P. G. Sandner and I. M. Welpe, “Predicting Elections with Twitter: What 140 Characters Reveal about Political Sentiment,” Proceedings of the

International Conference on Weblogs and Social Media (ICWSM’10), 2010.

[9] M. D. Conver, B. Goncalves, J. Ratkiweicz, A. Flammini, F. Menczer, “Predicting the Political Alignment of Twitter Users,” Proceedings of the IEEE Conference on Social Computing (SocialCom’11), 2011.

[10] Clay Fink, Nathan Bos, Alexander Perrone, Edwina Liu, and Jonathon Kopcky,

“Twitter, Public Opinion, and the 2011 Nigerian Presidential Election,” Proceedings of the IEEE Conference on Social Computing (SocialCom’13), 2013.

[11] A. Makazhanov and D. Rafiel, “Predicting Political Preference of Twitter Users,”

Proceedings of the International Conference on Advances in Social Network Analysis and Mining (ASONAM’13), 2013.

[12] S. O’Banion and L. Birnbaum, “Using Explicit Linguistic Expressions of Preference in Social Media to Predict Voting Behavior,” Proceedings of the International Conference on Advances in Social Network Analysis and Mining (ASONAM’13), 2013.

[13] Marco Pennacchiotti, Ana-Maria Popescu,” Democrats, Republicans and Starbucks Afficionados: User Classification in Twitter,” Proceedings of the 17th SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD’11), 2011.

[14] Tumitan, Diego, and Kurt Becker. "Sentiment-based features for predicting election polls: a case study on the brazilian scenario." Web Intelligence (WI) and Intelligent Agent Technologies (IAT), 2014 IEEE/WIC/ACM International Joint Conferences on. Vol. 2.

IEEE, 2014.

[15] Z. Dong and Q. Dong, “HowNet and the Computation of Meaning,” World Scientific

[16] Wu, Xindong, et al. "Top 10 algorithms in data mining." Knowledge and Information Systems 14.1 (2008): 1-37.

[17] L. W. Ku and H. H. Chen, "Mining Opinions from the Web: Beyond Relevance Retrieval," Journal of American Society for Information Science and Technology, Special Issue on Mining Web Resources for Enhancing Information Retrieval, 2007, Volume 58 Issue 12, pp.1838-1850.

[18] 江家榕,以社群媒體為考量之選民政治傾向探索,政治大學論文,2015

[22] 維基百科https://zh.wikipedia.org/wiki/Wikipedia:%E9%A6%96%E9%A1%B5 [23] 中央研究院中文斷詞系統,http://ckipsvr.iis.sinica.edu.tw/[2011/11/12]

[24] 陳克健, 黃淑齡, 施悅音, 和陳怡君, “多層次概念定義與複雜關係表達-繁體 字知網的新增架構,” 漢語詞彙語義研究的現狀與發展趨勢國際學術研討會, 2004.

[25]Weaver, Jesse, and Paul Tarjan. "Facebook linked data via the graph API." Semantic Web 4.3 (2013): 245-250.

[26] 黃羿綺,政治人物之社交網路建置與分析,政治大學論文,2015 [27]Loureiro, Antonio, Luis Torgo, and Carlos Soares. "Outlier detection using

clustering methods: a data cleaning application." Proceedings of KDNet Symposium on Knowledge-based Systems for the Public Sector. Bonn, Germany. 2004.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

[28]Lewis, David D. "Naive (Bayes) at forty: The independence assumption in

information retrieval." Machine learning: ECML-98. Springer Berlin Heidelberg, 1998.

[29]Zhang, Min-Ling, and Zhi-Hua Zhou. "ML-KNN: A lazy learning approach to multi-label learning." Pattern recognition 40.7 (2007): 2038-2048.

[30]Joachims, Thorsten. Making large scale SVM learning practical. Universität Dortmund, 1999.

[31]Safavian, S. Rasoul, and David Landgrebe. "A survey of decision tree classifier methodology." (1990).

[32]Rätsch, Gunnar, Takashi Onoda, and K-R. Müller. "Soft margins for AdaBoost."

Machine learning 42.3 (2001): 287-320.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

附錄 RapidMiner 操作簡介

1.簡介

RapidMiner10原名 Yale,是一款應用於資料探勘、機器學習、商業模型等商業套裝軟 體,其中完整包含資料的載入與轉換、資料前處理、視覺化、建模、實驗與部署。

RapidMiner 亦是由 Java 程式設計語言編寫,其中還可擴充 WEKA 學習和評估方法,

套件功能仍不斷擴充中,並可以與 R 語言進行協同工作。因為含有 GUI 特性,故使用 上非常容易上手,也是近年來普遍的主因。

2.介面介紹

下圖為 RapidMiner 標準介面,將著將介紹四大介面,分別為操作區、儲存區、流程區、

參數區。

10 https://rapidminer.com/products/studio/

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

2.1 物件區

物件區中為物件所在位置,包含讀寫檔案、機器學習演算法、資料轉換、前處理等,

從這個區域拉出想要的物件至流程區進行操作。

2.2 儲存區

此一區域主要為資料來源與流程儲存區,可以與資料庫做連結,直接抓取資料庫中資 料進流程區。而流程儲存則為先前工作中的流程可以儲存至此,以便下一次使用時直 接選擇所需要的流程。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

2.3 流程區

此一區域為主要的工作流程區,從物件區中拉出所需的工作,在流程區中做控管。而 處理流程將依照使用者需求操作。

2.4 參數區

此一區域為物件區與流程區所需要的細部設定與參數調整區。將依照工作與演算法的 不同而有不同的參數設定。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

3.實際操作

此一部分將實際操作本論文兩種預測模型的流程。

3.1 模型一操作

Step1.

先從物件區中拉出讀檔物件 read CSV(也可直接從資料庫中撈出資料),從參數區中可 以找到智慧匯入功能 import configuration wizard,利用這個功能將輕鬆告知 RapidMiner 你的資料格式。

Step2.

當開啟智慧匯入時,選擇您所要匯入的資料路徑。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step3.

當選擇完匯入路徑後,將會初步看到我們的資料長相,此一模型 input 僅三個欄位,

分別為 id、message、label,在此區域主要是讓 RapidMiner 知道你資料的格式與長相,

可以利用介面中 column separation 正確的切出您要的資料。其中 message 為貼文資料 (此處因為 RapidMiner 目前不支援中文斷詞,若文本為中文須先進行斷詞如下例所 示)。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step4.

匯入資料中最後一步,須告知 RapidMiner 您的欄位各為代表什麼意義,可以透過下拉 選單設定您的欄位是 id、attribute 或是 label,並告知此特徵的型態為何。在此處若設 定錯誤將造成後續流程無法進行。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step5.

當完成匯入後,從物件區拉出另一個物件 nominal to text,這個物件的功能為把 nominal 型態的特徵(也就是 message)轉換成 text 型態,這是為了後續能夠順利將 資料送入下一個物件 process document,並且在參數區中調整您要轉換的特徵有幾 個與名稱為何。

Step6.

接下來就可以順利將資料送入下一個物件 process document,這個物件也是此模型 最重要的物件,他的功能除了資料前處理以外,還能直接製作出我們需要的 input matrix,從右邊參數區中選擇製作 matrix 的方式,有 TF/TFIDF/BTO 等,當然也 可以按照需求選擇您喜歡的參數。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step7.

當設定完 input matrix 的方式後,欲進行資料前處理,對 process document 這個物 件點兩下,將會進入它的副流程區,在這一個區域進行製作 matrix 前所需要的資 料處理,此處物件在物件區 text processing 目錄底下,本模型選擇了 tokenize、filter stopwords(內建各國停止詞字典)與可以自行擴充停止詞、transform lower case(將 英文全部轉為小寫)。前處理物件流程亦可以依使用者需求做調整,當排定好物件 後須將它們串連起來,資料會從最左邊物件一路傳到最右邊。

Step8.

當完成前處理與 input matrix 後,接下來便可以進行實驗部分。選擇 validation 物 件,並在參數區調整 validation fold 數,以及取樣方式。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step9.

進入 validation 副流程中,將會看見兩個區域 training 與 testing,這邊要選擇分類 器(可以在物件區中 modeling 目錄中選擇您所想要執行的演算法),在 training 中 選擇 naïve Bayes 分類器,testing 區域中 apply model 物件代表 test data 將用 training 出來的模型來進行測試,而中間連接 mod 為 model 縮寫,此區域為 model 在做連 接,當訓練與測試完資料後,利用 performance 物件告知 RapidMiner 您需要跑出 哪些實驗指標,可以在參數區做調整。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step10.

最後把我們選擇的物件串流,把物件與物件中拉連接線(每個物件有對應的連接線,

需要讀每個物件的說明),並在最後把線拉至最右側 res,此處為結果顯示區,表 示把您想要呈現出來的資料拉至結果顯示區。當整個流程都完整後,可以按下執 行鍵,在每個物件左下角有綠色圖示告知目前流程執行至哪個階段。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step11.

當流程執行完畢後,會自動跳入結果顯示區,此區域出現的資訊會按照使用者的 需求做變動,本模型執行完後分別會顯示以下四種 output。

Matrix 在前處理後所留下的相異字與其對應的詞頻。

實驗結果 class precision、class recall 與 accuracy

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Input matrix 列為貼文 id,行為相異字。

Naïve Bayes 分類器所執行的相關數據。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

3.2 模型二操作

此一模型比上述模型單純,在此特徵皆已經透過外部程式轉換完成,故只需要將特徵 匯入,直接執行實驗部分。流程區如下圖,讀檔 read CSV、sample 物件為平衡資料、

validation 實驗。

Step1.

讀檔使用智慧匯入功能,告知 RapidMiner 欲使用的特徵與 label 欄位。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Step2.

在 validation 副流程區選擇所訓練分類器,並利用 apply model 物件來 testing。

實驗結果 class precision、class recall 與 accuracy。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

模型中所使用的特徵也會清楚列出,以供後續做統計分析使用。

相關文件