Classification of offences in narcotic cases using machine learning
Main Article Content
Abstract
The examination of indictments in narcotic cases requires considerable time and attention to detail, posing challenges for judicial officers. This study aimed to reduce such burdens and enhance the efficiency of the justice process. Therefore, the objective of this research was to develop and evaluate the performance of a machine learning model for classifying offences in narcotic cases. The research consisted of five main steps: (1) collecting 1,651 narcotic case samples from the Suphanburi Provincial Court (January 2022 – May 2024), (2) exploring the dataset, (3) preprocessing the data using PyThaiNLP and TF-IDF, (4) developing a two-stage classification model, where stage one classified narcotic types using a multi-class classification with a One-vs-Rest strategy, and stage two classified the nature of the offence using a multi-label classification with a Classifier Chains strategy, and (5) evaluating the model performance using three algorithms (Support Vector Machine, Logistic Regression, and Random Forest) via 5-fold cross-validation. The results indicated that the Random Forest algorithm achieved the highest performance and stability in both stages, with an F1-score of 99.55% for stage one and 97.70% for stage two, along with a Hamming Loss of 1.58%. These findings demonstrate the potential of the proposed model in assisting the classification of offences in narcotic cases.
Article Details
References
กัญญารัตน์ พูลเพิ่ม, และแกมกาญจน์ สมประเสริฐศรี. (2565). การจำแนกโครงการตามแผนแม่บทภายใต้ยุทธศาสตร์ชาติโดยใช้เทคนิคเหมืองข้อความ. วารสารวิชาการการจัดการเทคโนโลยี มหาวิทยาลัยราชภัฏมหาสารคาม, 9(2), 54–65.
จินตรัย พุทธิพรชัย. (2565). การจำแนกประเภทแบบหลายฉลากของบทความในฐานข้อมูลวารสารวิชาการไทยจากบทคัดย่อ [ปริญญามหาบัณฑิต, จุฬาลงกรณ์มหาวิทยาลัย]. Chulalongkorn University Theses and Dissertations (Chula ETD). https://digital.car.chula.ac.th/chula-etd/6481
เทวัน เทียนวรรณ. (2566). การประเมินข้อความทวิตเตอร์ที่เกี่ยวกับทัศนคติด้านสุขภาพในสถานการณ์การแพร่ระบาดของโควิด-19 เพื่อวิเคราะห์ความรู้สึกโดยใช้อัลกอริทึมการเรียนรู้ของเครื่องแบบมีผู้สอน. วารสารเภสัชกรรมไทย มหาวิทยาลัยสงขลานครินทร์, 16(3), 769–786.
ประมวลกฎหมายยาเสพติด. (2564). ประมวลกฎหมายยาเสพติด พ.ศ. 2564. ราชกิจจานุเบกษา, เล่ม 138 ตอนที่ 73 ก, หน้า 1–80.
ไพชยนต์ คงไชย. (2565). การสร้างแบบจำลองโดยใช้การเรียนรู้เชิงลึกเพื่อจำแนกข้อความการสนทนาจากแอปพลิเคชันไลน์. วารสารวิทยาศาสตร์และเทคโนโลยี มหาวิทยาลัยมหาสารคาม, 43(1), 16–24.
วรวรรณ วันดี. (2564). การจำแนกประเภทแบบมัลติเลเบลสำหรับหัวเรื่องหนังสือทางบรรณารักษศาสตร์ [ปริญญามหาบัณฑิต, มหาวิทยาลัยธรรมศาสตร์]. Thammasat University Digital Collections. https://doi.org/10.14457/TU.the.2021.478
สำนักงานส่งเสริมงานตุลาการ. (2566, 27 ตุลาคม). การเรียกข้อมูลจากสำนักงานอัยการสูงสุดเข้าสู่ระบบสารสนเทศสำนวนคดีศาลชั้นต้นโดยอัตโนมัติ. สำนักงานศาลยุติธรรม. https://oja.coj.go.th/th/content/category/detail/id/21/iid/379504
สุภัทรลักษณ์ โพธิ์หา. (2565). แบบจำลองวิเคราะห์ความรู้สึกผู้ใช้บริการที่มีต่อการให้บริการของโรงพยาบาลมาตรฐาน JCI ในประเทศไทย [ปริญญามหาบัณฑิต, มหาวิทยาลัยธรรมศาสตร์]. Thammasat University Digital Collections. https://doi.org/10.14457/TU.the.2022.1519
เอกชัย ฉัตรพงศ์เลอเลิศ. (2567). การจำแนกข้อความตามทฤษฎีการวิเคราะห์การสื่อสารสัมพันธ์ระหว่างบุคคลด้วยเทคนิคการเรียนรู้ของเครื่อง [ปริญญามหาบัณฑิต, มหาวิทยาลัยธรรมศาสตร์]. Thammasat University Digital Collections. https://doi.org/10.14457/TU.the.2024.52
Buntoro, G. A., Wibawa, A. D., & Purnomo, M. H. (2021). Text mining in healthcare for disease classification using machine learning algorithm. IEEE Access, 9, Article 9593998. https://doi.org/10.1109/IES53407.2021.9593998
Costa, J. A. F., Silva, S. O., Silva, E. D. S. A., & Dantas, N. C. D. (2024). Multi-label classification of legal cases according to the Sustainable Development Goals using machine learning algorithms. In 2024 IEEE Latin American Conference on Computational Intelligence (LA-CCI). IEEE. https://doi.org/10.1109/LA-CCI62337.2024.10814740
Mahdi, Z. M., Istiqomah, R. F., Alfarelzi, Astuti, S., Asror, I., & Mayasari, R. (2024). Text classification using NLP by comparing LSTM and machine learning method. In 2024 10th International Conference on Wireless and Telematics (ICWT). IEEE. https://doi.org/10.1109/ICWT62080.2024.10674679
Memoon, M., Umar, M., Rani, S., Khalid, M., & Shaheen, S. (2024). Twitter news classification using machine learning. In 2024 International Conference on Engineering & Computing Technologies (ICECT). IEEE. https://doi.org/10.1109/ICECT61618.2024.10581173
Morales-Hernández, R. C., Gutiérrez Jagüey, J., & Becerra-Alonso, D. (2022). A comparison of multi-label text classification models in research articles labeled with sustainable development goals. IEEE Access, 10, 123534–123547. https://doi.org/10.1109/ACCESS.2022.3223094
Naseeba, B., Challa, N. P., Doppalapudi, A., Chirag, S., & Nair, N. S. (2023). Machine learning models for news article classification. In 2023 5th International Conference on Smart Systems and Inventive Technology (ICSSIT). IEEE. https://doi.org/10.1109/ICSSIT55814.2023.10061095
Rizqi, F. N., Bijaksana, M. A., & Bunyamin. (2025). Multi-label classification of Al-Qur’an verses using ensemble method and BERT. In 2025 International Conference on Advancement in Data Science, E-learning and Information System (ICADEIS). IEEE. https://doi.org/10.1109/ICADEIS65852.2025.10933388
Sinha, A., Nazma, M., Naskar, B. J., Pandey, M., & Rautaray, S. S. (2022). IMDB movie review text classification model using different weighting techniques and classifiers. In 2022 OITS International Conference on Information Technology (OCIT) (pp. 1–6). IEEE. https://doi.org/10.1109/OCIT56763.2022.00029