Penerapan Gini Index Dalam Algoritma Decision Tree Untuk Klasifikasi Edibilitas Jamur
Application of Gini Index in Decision Tree Algorithm for Mushroom Edibility Classification
Keywords:
Gini Index, Decision Tree, Classification, Mushroom Edibility, Machine LearningAbstract
Misidentification of mushrooms can cause health risks because several poisonous mushrooms show physical characteristics similar to edible mushrooms. This study aims to apply the Gini Index in the Decision Tree algorithm to classify mushroom edibility and evaluate model performance on test data. The research used the Mushroom Dataset consisting of 8,124 samples, 22 physical feature attributes, and one target attribute labeled edible or poisonous. The research process included data inspection, one-hot encoding for categorical features, label encoding for the target class, splitting the data into training and testing sets with an 80:20 ratio, training a DecisionTreeClassifier based on the Gini Index, and evaluating the model using a confusion matrix, accuracy, precision, recall, and F1-score. The test result on 1,625 samples produced an accuracy of 99.02 percent. The model correctly classified 809 edible samples and 800 poisonous samples. Precision, recall, and F1-score for both classes were around 0.99. These findings indicate that the Gini-based Decision Tree provides accurate and interpretable classification. The model can serve as an initial decision support basis, while expert validation remains necessary for field implementation
References
[1] Hawksworth, D. L., & Lücking, R. (2017). Fungal diversity revisited: 2.2 to 3.8 million species. Microbiology Spectrum, 5(4), 79-95.
[2] Pinky, N. J., Islam, S. M., & Alice, R. S. (2019). Edibility detection of mushroom using ensemble methods. International Journal of Image, Graphics and Signal Processing, 11(4), 55-62.
[3] Chumuang, N., Sukkanchana, K., Ketcham, M., Yimyam, W., Chalermdit, J., Wittayakhom, N., & Pramkeaw, P. (2020). Mushroom classification by physical characteristics by technique of K-nearest neighbor. International Joint Symposium on Artificial Intelligence and Natural Language Processing, 1-6.
[4] Haksoro, E. I., & Setiawan, A. (2021). Pengenalan jamur yang dapat dikonsumsi menggunakan metode transfer learning pada convolutional neural network. Jurnal ELTIKOM, 5(2), 81-91.
[5] Putra, I. P., & Hermawan, R. (2021). Identifikasi jamur beracun Clitocybe sp. di Gresik, Indonesia. Media Penelitian dan Pengembangan Kesehatan, 31(2), 119-124.
[6] Benos, L., Tagarakis, A. C., Dolias, G., Berruto, R., Kateris, D., & Bochtis, D. (2021). Machine learning in agriculture: A comprehensive updated review. Sensors, 21(11), 3758.
[7] Zahan, N., Hasan, M. Z., Malek, M. A., & Reya, S. S. (2021). A deep learning-based approach for edible, inedible and poisonous mushroom classification. International Conference on Information and Communication Technology for Sustainable Development, 440-445.
[8] Wahdini, M. G., & Lawi, A. (2022). Klasifikasi jamur dapat dikonsumsi dan beracun menggunakan model Bayesian Network. Seminar Nasional Teknik Elektro dan Informatika, 8(1), 234-238.
[9] Enggari, S., Ramadhanu, A., & Marfalino, H. (2022). Peningkatan digital image processing dalam mendeskripsikan tumbuhan jamur dengan segmentasi warna, deteksi tepi dan kontur. Jurnal Teknologi dan Sistem Informasi Bisnis, 4(1), 70-75.
[10] Lee, S., Lee, C., Mun, K. G., & Kim, D. (2022). Decision tree algorithm considering distances between classes. IEEE Access, 10, 69750-69756.
[11] Metlek, S., & Çetiner, H. (2023). Classification of poisonous and edible mushrooms with optimized classification algorithms. International Conference on Applied Engineering and Natural Sciences, 1(1), 408-415.
[12] Rudiyanto, A. R., Pujiono, P., Soeleman, M. A., & Mustagfirin, M. A. (2023). Performance of the decision tree algorithm in the classification of edible and poisonous mushrooms with information gain optimization. Scientific Journal of Informatics, 10(4), 549-558.
[13] Gong, Y., Liu, G., Xue, Y., Li, R., & Meng, L. (2023). A survey on dataset quality in machine learning. Information and Software Technology, 162, 107268.
[14] Bouke, M. A., Abdullah, A., ALshatebi, S. H., Abdullah, M. T., & El Atigh, H. (2023). An intelligent DDoS attack detection tree-based model using Gini index feature selection method. Microprocessors and Microsystems, 98, 104823.
[15] Harneni, L., Jauhari, C. K., Hia, R. R., Pideksa, N. K., Musthofa, M. A., Hendriyadi, M. Z., & Septiani,
N. W. P. (2024). Klasifikasi jamur yang dapat dikonsumsi berdasarkan citra menggunakan pre-trained model Inception V3. JRKT: Jurnal Rekayasa Komputasi Terapan, 4(2), 169-176.
[16] Sugeru, H., Nurthoyibah, H. A. I., Fajar, M. A. N., Diputra, V. J., & Ilham, M. Y. R. (2024). Perbandingan teknik klasifikasi data mining untuk penentuan jenis jamur beracun. Jurnal Ilmu Komputer dan Teknologi, 5(3), 23-31.
[17] Admojo, F. T., Radhitya, M. L., Zein, H., & Naswin, A. (2024). Classification of mushroom edibility using K-nearest neighbors: A machine learning approach. Indonesian Journal of Data and Science, 5(3), 243-250.
[18] Mienye, I. D., & Jere, N. (2024). A survey of decision trees: Concepts, algorithms, and applications. IEEE Access, 12, 86716-86727.
[19] Bashir, R. N., Mzoughi, O., Riaz, N., Mujahid, M., Faheem, M., Tausif, M., & Khan, A. R. (2024). Mushroom species classification in natural habitats using convolutional neural networks. IEEE Access, 12, 97391-97405.
[20] Özbay, E., Özbay, F. A., & Gharehchopogh, F. S. (2024). Visualization and classification of mushroom species with multi-feature fusion of metaheuristics-based convolutional neural network model. Applied Soft Computing, 164, 111936.
[21] Wei, Z., Liu, H., Xu, J., Li, Y., Hu, J., & Tian, S. (2024). Quality grading method for Pleurotus eryngii during postharvest storage based on hyperspectral imaging and multiple quality indicators. Food Control, 166, 110763.
[22] Yang, K., Zhao, M., & Argyropoulos, D. (2025). Machine learning based framework for the detection of mushroom browning using a portable hyperspectral imaging system. Postharvest Biology and Technology, 219, 113247.
[23] Siregar, H. F., & Anggara, A. (2025). Implementasi Android Jetpack Compose pada aplikasi machine learning Sijamur untuk prediksi konsumsi jamur beracun. Jurnal Informatika Teknologi dan Sains, 7(2), 904-912.
[24] UCI Machine Learning Repository. (2024). Mushroom data set. University of California, Irvine. https://archive.ics.uci.edu/dataset/73/mushroom
[25] Pratiwi, N. I., & Prabowo, A. (2025). Analisis servicescape, hedonic lifestyle dan promotion intention terhadap keputusan pembelian konsumen pada Suara Coffee & Space. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 4547–4555. https://doi.org/10.31004/riggs.v4i3.2656
[26] Riska, A., & Prabowo, A. (2025). Analisis social media marketing, servicescape, dan harga terhadap keputusan pembelian konsumen di Romansa Kopi. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 4917–4925. https://doi.org/10.31004/riggs.v4i3.2710
[27] Arini, D. P., & Prabowo, A. (2025). Analisis customer experience dan customer trust terhadap keputusan pasien berkunjung kembali pada Klinik Alternatif Akupuntur Serumpun Bambu. ANALISIS, 15(2), 310–328. https://doi.org/10.37478/als.v15i02.6497
[28] Prabowo, A., Adam, A. A., Subhan, Z. N., Tanjung, Y., Parhusip, A. A., Deviana, A., & Irwansyah. (2025). Sustainable business practices in coffee shops: The role of marketing innovation, digital marketing, and branding innovation through market development. International Journal of Accounting and Economics Studies, 12(6), 43–50. https://doi.org/10.14419/p0k0pc78
[29] Akila, F., & Prabowo, A. (2025). Pengaruh customer experience, perceived product quality dan brand trust terhadap keputusan pembelian konsumen Dunkin Donuts Gatot Subroto. ProBisnis: Jurnal Manajemen, 16(5), 1157–1165. https://ejournal.joninstitute.org/index.php/ProBisnis/article/view/1158
[30] Kurniawan, D., & Prabowo, A. (2025). Analisis customer relationship marketing, marketing communications dan service quality personal trainer terhadap tingkat kepuasan member pada Vizta Gym Cemara Asri Medan. VALUE: Jurnal Ilmiah Akuntansi, Keuangan dan Bisnis, 6(2), 392–407. https://doi.org/10.36490/value.v6i2.2160
[31] Prabowo, A., Tanjung, Y., Enzelia, E. L., Bangun, R., Simarmata, H. M. P., & Wahyuni, E. S. (2025). Eksplorasi promosi berbasis social media marketing dan brand image: Identifikasi impulsive buying behaviour melalui customer engagement pada konsumen brand fashion ZARA di Kota Medan. Jurnal Dunia Pendidikan, 6(3), 727–747. https://doi.org/10.55081/jurdip.v6i3.4431
[32] Prabowo, A., & Tarigan, T. D. (2025). Analisis servicescape, social media marketing dan customer experience terhadap minat berkunjung kembali konsumen Fore Coffee Citraland Helvetia Medan. Jurnal Dunia Pendidikan, 6(3), 996–1010. https://doi.org/10.55081/jurdip.v6i3.4581
[33] Prabowo, A., Siburian, P., & Bangun, R. (2025). Repurchase intention among millennial coffee shop customers: Exploring key determinants. International Journal of Accounting and Economics Studies, 12(8), 761–769. https://doi.org/10.14419/j7ch0q39
[34] Tanjung, S., & Prabowo, A. (2025). Analisis social media marketing dan customer relationship marketing terhadap kepuasan konsumen Sikologi Coffee. Economic and Education Journal (Ecoducation), 7(3), 975–989. https://doi.org/10.33503/ecoducation.v7i3.2345
[35] Rizki, S., Prabowo, A., & Pasaribu, E. S. (2025). Optimalisasi kinerja karyawan pada kawasan industri di Sumatera Utara: Peran work engagement dan employee experience melalui safety knowledge. Economic and Education Journal (Ecoducation), 7(3), 1022–1038. https://doi.org/10.33503/ecoducation.v7i3.2386
[36] Tarigan, R. R. M. T., Wahyuni, E. S., Prabowo, A., & Mauliza, P. (2026). Pengaruh pemasaran digital terhadap keputusan pembelian dengan citra merek sebagai variabel mediasi. MARAS: Jurnal Penelitian Multidisiplin, 4(1), 110–119. https://doi.org/10.60126/maras.v4i1.1503
[37] Mahlia, M., & Prabowo, A. (2026). Analisis experiental marketing, word of mouth, dan online customer review terhadap keputusan pembelian pada PT. Alfa Scorpii. RIGGS: Journal of Artificial Intelligence and Digital Business, 5(1), 14596–14606. https://doi.org/10.31004/riggs.v5i1.8083
[38] Dalimunthe, S. M., & Pohan, Y. A. (2025). Pengaruh budaya digital, pengembangan sumber daya manusia (SDM) dan lingkungan kerja fisik terhadap kinerja pegawai Dinas Ketenagakerjaan Kota Medan. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 7004–7014. https://doi.org/10.31004/riggs.v4i3.3050
[39] Tambunan, A. M., & Pohan, Y. A. (2025). Pengaruh inovasi produk, free layanan after sales dan kualitas informasi produk di website terhadap keputusaan pembelian mesin Inkjet PT. Megasatria Hiticher. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 7412–7422. https://doi.org/10.31004/riggs.v4i3.3107
[40] Delvin, S., & Pohan, Y. A. (2025). Pengaruh komitmen afektif, komitmen berkelanjutan dan komitmen normatif terhadap kinerja karyawan PT Navya Retail Indonesia. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 7540–7550. https://doi.org/10.31004/riggs.v4i3.3134
[41] Zai, S., & Pohan, Y. A. (2025). Pengaruh sanksi keterlambatan, biaya administrasi dan tarif jasa simpan terhadap kepuasan nasabah dalam menggunakan jasa gadai pada PT. Sentral Gadai Persada. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3). https://doi.org/10.31004/riggs.v4i3.3284
[42] Devini, S. Z., & Pohan, Y. A. (2025). Pengaruh kualitas pelayanan, kualitas produk dan fasilitas terhadap kepuasan pelanggan Lazatto Chicken & Burger cabang UMSU. Jurnal Daya Saing, 11(3), 899–905. https://doi.org/10.35446/dayasaing.v11i3.2504
[43] Zulnawati, S. E., & Pohan, Y. A. (2026). Pengaruh perceived ease of use, brand trust dan customer experience terhadap minat pengguna Maxim di Kota Medan. Jurnal Akutansi Manajemen Ekonomi Kewirausahaan (JAMEK), 6(1), 112–120. https://doi.org/10.47065/jamek.v6i1.2285
[44] Rezzaini, H., Kadariah, S., & Riski, B. (2025). Pengaruh pembiayaan murabahah dan literasi keuangan terhadap kesejahteraan nasabah UMKM. Jurnal Riset Perbankan Syariah, 4(2), 143–152. https://doi.org/10.29313/jrps.v4i2.8726
[45] Nazli, P., Kadariah, S., & Sari, S. P. (2026). Model peningkatan minat menabung generasi Z di bank syariah melalui media sosial dan edukasi digital untuk penguatan ekosistem keuangan. Journal of Science and Social Research, 9(3), 4999–5005. https://doi.org/10.54314/jssr.v9i3.6723
[46] Sipahutar, E., Asshidiq, H., Kadariah, S., Murtani, A., Nazli, P., & Trihapsari, M. (2026). Integrasi pengetahuan, religiusitas, promosi dan minat dalam keputusan menabung berbasis perilaku individu: Pendekatan multidisiplin (MSDM, psikologi, perbankan syariah, dan akuntansi). Jurnal Ilmiah Edunomika, 10(2). https://doi.org/10.29040/jie.v10i2.19873
[47] Reza, F., & Nazli, P. (2025). SWOT analysis in the marketing strategy of IB Mudarabah Deposit products at PT. Bank Sumut KCP Syariah Karya Medan. Digital Business: Tren Bisnis Masa Depan, 16(4), 171–178. https://ejournal.cria.or.id/index.php/db/article/view/357
[48] Andira, M. F., & Ridwan, M. (2025). The influence of service quality, transparency, and religiosity on PT Bank Mandiri employees’ interest in donation to Ziswaf at The Mandiri Amal Insani Zakat (LAZ) Institution Medan Representative. BISEI: Jurnal Bisnis dan Ekonomi Islam, 10(2), 117–130. https://doi.org/10.33752/bisei.v10i2.10758
[49] Ainayah, D., Hutagalung, M. K., Riski, B., & Arafah, S. (2025). Pengaruh perceived value dan perceived quality terhadap loyalitas nasabah pembiayaan KPR IB Griya pada PT Bank Sumut Syariah KCPSY Hamparan Perak. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(4), 2015–2021. https://doi.org/10.31004/riggs.v4i4.3561
[50] Daulay, Z., Riski, B., & Hutagalung, M. K. (2025). Analisis implementasi metode pemasaran direct selling pada produk talangan umroh di PT. Bank Sumut Syariah Kantor Cabang Pembantu Hamparan Perak. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(4), 2133–2143. https://doi.org/10.31004/riggs.v4i4.3551
[51] Rahman, R. J., Miko, J., & Rizki, B. (2025). The impact of mobile banking services on customer satisfaction in the digital era at PT. Bank Sumut Syariah KCP Hamparan Perak. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(4), 5940–5946. https://doi.org/10.31004/riggs.v4i4.4135
[52] Rezzaini, H., Kadariah, S., & Riski, B. (2025). Pengaruh pembiayaan murabahah dan literasi keuangan terhadap kesejahteraan nasabah UMKM. Jurnal Riset Perbankan Syariah, 4(2), 143–152. https://doi.org/10.29313/jrps.v4i2.8726
[53] Daulay, Z., Riski, B., & Hutagalung, M. K. (2025). Analisis implementasi metode pemasaran direct selling pada produk talangan umroh di PT. Bank Sumut Syariah Kantor Cabang Pembantu Hamparan Perak. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(4), 2133–2143. https://doi.org/10.31004/riggs.v4i4.3551
[54] Alfinsyah, R., & Murtani, A. (2025). Analysis of the use of QRIS as financial technology among millennials: A case study at Warkop Kita 2 and Warkop Agam. Digital Business: Tren Bisnis Masa Depan, 16(4), 164–170. https://doi.org/10.59651/digital.v16i4.355
[55] Eka Putra, S., Nurmala Sari, T., Simatupang, J., Murtani, A., & Tanjung, Y. (2025). Analysis of the benefits of the 7P marketing mix strategy on the brand image of Butong Tea at PT Perkebunan Nusantara IV Bah Butong. Jurnal Ilmiah Sosio-Ekonomika Bisnis, 28(2), 30–37. https://doi.org/10.22437/jiseb.v28i02.41506