Penentuan kategori suatu cerita merupakan hal yang penting agar cerita yang dibaca sesuai dengan keinginan pembaca. Selama ini proses penentuan kategori suatu cerita masih dilakukan secara manual sehingga perlu adanya pengklasifikasian kategori cerita secara otomatis. Metode klasifikasi atau kategorisasi teks merupakan proses yang secara otomatis meletakkan dokumen teks ke dalam suatu kategori berdasarkan isi dari teks tersebut. Pada penelitian ini peneliti mengusulkan sebuah metode hybrid PSO-KNN yaitu penggabungan metode Modified Binary Particle Swarm Optimization dengan K-Nearest Neighbor. Metode PSO-KNN akan mengatasi permasalahan pengklasifikasian teks sekaligus mengatasi kelemahan KNN yang menggunakan seluruh fitur saat proses pembentukan model (learning). PSO-KNN akan mengurangi dimensi dari dokumen dengan memilih token-token sebagai fitur yang paling baik namun isi yang dikandung dokumen tetap terjaga karena fitur yang dipilih sangat merepresentasikan dokumen tersebut. Penerapan metode PSO-KNN berhasil mengkategorikan cerita Bahasa Indonesia sebanyak 150 data dengan tingkat akurasi sebesar 53% sedangkan akurasi KNN hanya sebesar 45% serta berhasil mengurangi fitur awal KNN sebanyak 257 menjadi 88 fitur. Berdasarkan hasil penelitian yang dilakukan dapat disimpulkan bahwa metode PSO-KNN berhasil melakukan pengklasifikasi kategori cerita pendek serta mengurangi fitur saat proses pembentukan model dan meningkatkan nilai akurasi.
Kata Kunci— Klasifikasi Teks, Cerita Pendek, Modified Binary Particle Swarm Optimization, K-Nearest Neighbor, LOOCV.
Category determination of a story is important for the story to be read according to the reader’s wishes. During this time, the process of determining the stories category is still done manually so it is necessary to classify the category of stories automatically. A text classification or categorization method is a process that automatically puts the text document into a category based on the content of the text. In this study, the researcher proposes a method of hybrid PSO-KNN that combining Modified Binary Particle Swarm Optimization method with K-Nearest Neighbor. PSO-KNN method will solve the problem of text classification while overcoming the weaknesses of KNN which uses the entire features during the learning process. PSO-KNN will reduce the document’s dimensions by selecting tokens as the best feature, but the content of the document is still maintained because the selected features strongly represent the document. The implementation of the PSO-KNN method has successfully categorized Indonesian language stories by 150 data with an accuracy rate of 53% while the KNN accuracy was only 45% and succeeded in reducing the initial features of the KNN 257 to 88 features. Based on the results of the research, it can be concluded that the PSO-KNN method succeeded in classifying short story categories as well as reducing features during the modeling process and enhanced the accuracy value.
Keywords— Text Classification, Short Stories, Modified Binary Particle Swarm 0ptimization, K-Nearest Neighbor, LOOCV.