OPTIMASI KNN DENGAN PSO UNTUK KLASIFIKASI KASUS HUKUM DI AUSTRALIA MENGGUNAKAN N-GRAM - Karan; M Alidin; Rafi Fadilla (Jurnal Rekayasa Perangkat Lunak dan Sistem Informasi, 2025)
This study aims to improve the accuracy of legal case classification in Australia by integrating the K-Nearest Neighbors (KNN) algorithm optimized using Particle Swarm Optimization (PSO) and N-Gram-based text representation. The dataset consists of 15,263 legal documents collected from the Federal Court of Australia (FCA) with an 80:20 data split for training and testing. The classification process is carried out by applying TF-IDF weighting and a combination of N-Gram (unigrams, bigrams, trigrams) to enrich the data representation. The PSO optimization results show an optimal K value of 9, with a testing accuracy reaching 96%. The evaluation of the model performance shows a precision value of 0.95, a recall of 0.96, and an F1-Score of 0.94. These results indicate that the combination of KNN, PSO, and N-Gram is able to significantly improve the performance of legal document classification, especially in the Cited case category. However, the weakness of the model in the Not Cited category indicates the need to develop a method to handle data imbalance in order to improve model generalization.