Artificial intelligence (AI) technology is developing rapidly, particularly through platforms like ChatGPT and Gemini AI, which are widely used by students for various purposes. This fact highlights the importance of a more in-depth analysis of students' AI usage patterns. This study aims to classify the purposes of AI use by students using the K-Nearest Neighbor (K-NN) algorithm. The study was conducted using two classification approaches: multi-class classification and binary classification. Data were obtained from questionnaires with 305 respondents and processed using Python on the Google Colab platform using preprocessing, normalization, and data encoding stages. Test results show that the K-NN algorithm achieved a high accuracy of 77% in the binary classification scenario (Productive/Career and Entertainment/Personal), while in the multi-class classification scenario the highest accuracy only reached 34%. This finding indicates that K-NN performance is strongly influenced by the complexity of the number of classes and is more optimally applied to classifications with a limited number of classes.Keywords: K-Nearest Neighbor; AI usage classification; students; Binary Classification; Multi-class Classification.AbstrakTeknologi kecerdasan buatan ataupun Artificial Intelligence (AI) berkembang pesat, terutama melalui platform seperti ChatGPT dan Gemini AI yang banyak digunakan oleh mahasiswa untuk berbagai tujuan. Fakta ini menunjukkan pentingnya analisis yang lebih mendalam mengenai pola penggunaan AI oleh mahasiswa. Penelitian ini bertujuan untuk mengklasifikasikan tujuan penggunaan AI oleh mahasiswa memakai algoritma K-Nearest Neighbor (K-NN). Penelitian dilakukan melalui dua pendekatan klasifikasi, yaitu multi-class classification dan binary classification. Data didapatkan dari kuesioner terhadap 305 responden dan diolah memakai Python pada platform Google Colab menggunakan tahap pra-pemrosesan, normalisasi, dan pengkodean data. Hasil pengujian menunjukan algoritma K-NN mencapai akurasi tinggi yaitu 77% pada skenario klasifikasi biner (Produktif/Karir dan Hiburan/Personal), sementara pada skenario klasifikasi multi-kelas akurasi tertinggi hanya mencapai 34%. Temuan ini menandakan bahwa kinerja K-NN sangat dipengaruhi oleh kompleksitas jumlah kelas dan lebih optimal diterapkan pada klasifikasi dengan jumlah kelas yang terbatas.
Copyrights © 2025