Sistem Rekomendasi Tanaman Berdasarkan Kondisi Tanah Menggunakan Sensor Tanah 8-in-1 dan Algoritma Decision Tree
Abstract
Selecting crops that are suitable for specific soil conditions is an important factor in improving agricultural productivity. This study aims to develop a soil-based crop recommendation system using data collected from an 8-in-1 soil sensor. The analyzed parameters include electrical conductivity, soil temperature, soil moisture, pH, nitrogen (N), phosphorus (P), potassium (K), and soil fertility. The dataset consists of 500 observations categorized into five crop types: oil palm, coconut, rice, corn, and banana. To identify the most effective classification model, several machine learning algorithms were evaluated, including Decision Tree, Random Forest, Support Vector Machine (SVM), K-Nearest Neighbor (KNN), XGBoost, Gaussian Naive Bayes, and Logistic Regression. Model performance was assessed using accuracy, precision, recall, and F1-score metrics. The experimental results show that the Decision Tree algorithm achieved the best performance, with an accuracy of 95.6%, a precision of 0.952, a recall of 0.957, and an F1-score of 0.958. The confusion matrix analysis indicates that most samples were correctly classified into their respective crop categories. These findings demonstrate that the Decision Tree algorithm is highly effective in identifying crop suitability based on soil characteristics and has strong potential as a decision-support tool for crop recommendation in agricultural applications.
References
Eladl, S. G., Haikal, A. Y., Saafan, M. M., & ZainEldin, H. Y. (2024). A proposed plant classification framework for smart agricultural applications using UAV images and artificial intelligence techniques. Alexandria Engineering Journal, 109, 466–481. https://doi.org/10.1016/j.aej.2024.08.076
Elbasi, E., Mostafa, N., Zaki, C., AlArnaout, Z., Topcu, A. E., & Saker, L. (2024). Optimizing Agricultural Data Analysis Techniques through AI-Powered Decision-Making Processes. Applied Sciences (Switzerland), 14(17). https://doi.org/10.3390/app14178018
Hasanah, M. A., Soim, S., & Handayani, A. S. (2021). Implementasi CRISP-DM Model Menggunakan Metode Decision Tree dengan Algoritma CART untuk Prediksi Curah Hujan Berpotensi Banjir. In Journal of Applied Informatics and Computing (JAIC) (Vol. 5, Number 2). http://jurnal.polibatam.ac.id/index.php/JAIC
Ma, H., Zhao, G., Peng, B., Chen, B., Rong, Y., & Li, Y. (2025). Rapid Detection System of Paddy Impurities Based on Machine Vision. Journal of Food Processing and Preservation, 2025(1). https://doi.org/10.1155/jfpp/2338160
Motamedi, B., & Villányi, B. (2024). A predictive analytics model with Bayesian-Optimized Ensemble Decision Trees for enhanced crop recommendation. Decision Analytics Journal, 12. https://doi.org/10.1016/j.dajour.2024.100516
Prity, F. S., Hasan, M. M., Saif, S. H., Hossain, M. M., Bhuiyan, S. H., Islam, M. A., & Lavlu, M. T. H. (2024). Enhancing Agricultural Productivity: A Machine Learning Approach to Crop Recommendations. Human-Centric Intelligent Systems, 4(4), 497–510. https://doi.org/10.1007/s44230-024-00081-3
Rexlin Freeda, A. (n.d.). INTERNATIONAL JOURNAL OF PROGRESSIVE RESEARCH IN ENGINEERING MANAGEMENT AND SCIENCE (IJPREMS) STUDY PAPER: DECISION TREE ALGORITHMS IN MACHINE LEARNING. Retrieved www.ijprems.com
Ryo, M. (2022). Explainable artificial intelligence and interpretable machine learning for agricultural data analysis. Artificial Intelligence in Agriculture, 6, 257–265. https://doi.org/10.1016/j.aiia.2022.11.003
Schmidinger, J., Barkov, V., Tavakoli, H., Correa, J., Ostermann, M., Atzmueller, M., Gebbers, R., & Vogel, S. (2024). Which and how many soil sensors are ideal to predict key soil properties: A case study with seven sensors. Geoderma, 450. https://doi.org/10.1016/j.geoderma.2024.117017
Shams, M. Y., Gamel, S. A., & Talaat, F. M. (2024). Enhancing crop recommendation systems with explainable artificial intelligence: a study on agricultural decision-making. Neural Computing and Applications, 36(11), 5695–5714. https://doi.org/10.1007/s00521-023-09391-2
Song, T., Si, Y., Gao, J., Wang, W., Nie, C., & Klemeš, J. J. (2023). Prediction and monitoring model for farmland environmental system using soil sensor and neural network algorithm. Open Physics, 21(1). https://doi.org/10.1515/phys-2022-0224
Steinert, S., Ruf, V., Dzsotjan, D., Großmann, N., Schmidt, A., Kuhn, J., & Küchemann, S. (2024). A refined approach for evaluating small datasets via binary classification using machine learning. PLoS ONE, 19(5 May). https://doi.org/10.1371/journal.pone.0301276
Tanaka, T. S. T., Heuvelink, G. B. M., Mieno, T., & Bullock, D. S. (2024). Can machine learning models provide accurate fertilizer recommendations? Precision Agriculture, 25(4), 1839–1856. https://doi.org/10.1007/s11119-024-10136-x


