Application of K-Nearest Neighbors for Classification of Legal Cases in the Federal Court of Australia

Application of K-Nearest Neighbors for Classification of Legal Cases in the Federal Court of Australia

Authors

  • Karan Universitas Muhammadiyah Riau
  • Rafi Fadilla
  • M Alidin
  • Taslim

Abstract

With the development of information technology, especially in the legal field, legal case analysis can now be done more efficiently through the application of machine learning. This study aims to classify legal cases based on the status of Cited and Uncited using the K-Nearest Neighbor (KNN) algorithm. The classification process includes text preprocessing stages, word weighting using the TF-IDF method, and testing the KNN algorithm with various values ​​of the parameter k. The research data was taken from the Federal Court of Australia (FCA) covering legal cases from 2006–2009, with three data sharing scenarios: 90:10, 80:20, and 70:30. The evaluation model was carried out using a confusion matrix with metrics of accuracy, precision, recall, and F1-score. The best results were obtained in the 80:20 scenario with a value of k = 3, resulting in an accuracy of 96.36%, a precision of 96.80%, a recall of 99.49%, and an F1-score of 98.13%. With these results, the KNN algorithm is proven to be effective in supporting the automatic legal document classification process.

Downloads

Download data is not yet available.

References

[1] F. Ihsan Margolang, “Kontrak Perdagangan Internasional dalam Perspektif Hukum Perdata dalam Menyikapi Perbedaan Yuridiksi,” Gerechtikeit J., vol. 01, no. 01, pp. 26–31, 2024, [Online]. Available: https://journal.inacexter.com/index.php/gerechtikieit
[2] S. E. Ramadhania and S. Rani, “Implementasi Kombinasi Algoritma Genetika dan Tabu Search untuk Penyelesaian Travelling Salesman Problem,” Automata, vol. 2, no. 1, pp. 99–106, 2021, [Online]. Available: http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/
[3] L. Isyriyah, Adi Bayu Permadi, and R. Maulidi, “Penggunaan Algoritma K-Nearest Neighbors(KNN) dalam Klasifikasi Artikel Clickbait Berbahasa Indonesia,” Tematik, vol. 11, no. 1, pp. 7–15, 2024, doi: 10.38204/tematik.v11i1.1872.
[4] I. Chalkidis, M. Fergadiotis, P. Malakasiotis, and I. Androutsopoulos, “Large-scale multi-label text classification on EU legislation,” ACL 2019 - 57th Annu. Meet. Assoc. Comput. Linguist. Proc. Conf., pp. 6314–6322, 2020, doi: 10.18653/v1/p19-1636.
[5] S. Uddin, I. Haque, H. Lu, M. A. Moni, and E. Gide, “Comparative performance analysis of K-nearest neighbour (KNN) algorithm and its different variants for disease prediction,” Sci. Rep., vol. 12, no. 1, pp. 1–11, 2022, doi: 10.1038/s41598-022-10358-x.
[6] S. Bansal, “Klasifikasi Teks Kutipan Hukum,” p. 2021, 2021, [Online]. Available: https://www.kaggle.com/datasets/shivamb/legal-citation-text-classification/data
[7] M. Muharrom, “Komparasi Algoritma Klasifikasi Naive Bayes Dan K-Nearest Neighbors Dalam Analisis Sentimen Terhadap Opini Film Pada Twitter,” J. Inform. Dan Tekonologi Komput., vol. 3, no. 1, pp. 43–50, 2023, doi: 10.55606/jitek.v3i1.1147.
[8] A. Firdaus, “Aplikasi Algoritma K-Nearest Neighbor pada Analisis Sentimen Omicron Covid-19,” J. Ris. Stat., pp. 85–92, 2022, doi: 10.29313/jrs.v2i2.1148.
[9] G. Putra, A. Brahmantha, E. Utami, and A. Yaqin, “Klasifikasi Genre Anime Berdasarkan Sinopsis Menggunakan Algoritma K-Nearest Neighbors,” J. Manaj. Inform. Sist. Inf. , vol. 7, no. 1, pp. 15–24, 2024.
[10] A. Sentimen and G. Sandwich, “Jurnal KomtekInfo Implementasi K-Nearest Neighbor Berbasis Particle Swarm,” J. KomtekInfo, vol. 11, no. 4, pp. 371–379, 2024, doi: 10.35134/komtekinfo.v11i4.586.
[11] I. R. Lina and S. Retnowati, “Metode K-Nearest Neighbor Berbasis Forward Selection untuk Identifikasi Status Stunting pada Balita,” J. Comput. Sci. Inf. Technol., vol. 5, no. 3, pp. 695–704, 2024.
[12] P. M. Hasan, N. Ayu, and R. A. Saputra, “KLASIFIKASI KERINGANAN UKT MAHASISWA UHO MENGGUNAKAN K-NEAREST NEIGHBOR ( KNN ),” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 6, pp. 11939–11945, 2024.
[13] M. A. Satriawan and W. Widhiarso, “Klasifikasi Pengenalan Wajah Untuk Mengetahui Jenis Kelamin Menggunakan Metode Convolutional Neural Network,” J. Algoritm., vol. 4, no. 1, pp. 43–52, 2023, doi: 10.35957/algoritme.xxxx.
[14] R. Riskawati, F. Fatihanursari, I. Iin, and A. Rizki Rinaldi, “Penerapan Metode Naïve Bayes Classifier Pada Analisis Sentimen Aplikasi Gopay,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 1, pp. 346–353, 2024, doi: 10.36040/jati.v8i1.8699.
[15] S. Agustian et al., “Jurnal Computer Science and Information Technology ( CoSciTech ) Pengaruh Agregasi Data pada Klasifikasi Sentimen untuk Dataset Terbatas Menggunakan SGD Effect of Data Aggregation on Sentiment Classification for Limited Datasets Using SGD Classifier,” vol. 5, no. 3, pp. 626–634, 2024.
[16] N. Knn, “Analisa Sentimen Pada Media Sosial ‘ X ’ Pencarian Keyword ChatGPT Menggunakan Algoritma K-Nearest Abstrak,” vol. 5, no. 3, pp. 3291–3305, 2024.

Downloads

Published

2025-06-04

How to Cite

Karan, Rafi Fadilla, M Alidin, & Taslim. (2025). Application of K-Nearest Neighbors for Classification of Legal Cases in the Federal Court of Australia: Application of K-Nearest Neighbors for Classification of Legal Cases in the Federal Court of Australia. Jurnal CoSciTech (Computer Science and Information Technology), 6(1), 85–93. Retrieved from https://ejurnal.umri.ac.id/index.php/coscitech/article/view/8558