APPLICATION OF RANDOM FOREST AND HIERARCHICAL CLUSTERING MODELS FOR CROP AND FERTILIZER RECOMMENDATION TO FARMERS

Authors

  • S. S. Nandom Department of Computer Science, Federal University Wukari, Taraba, Nigeria
  • G. T. Abe Department of Computer Science, Federal University Wukari, Taraba, Nigeria
  • I. P. Gambo Department of Computer Science and Engineering Obafemi Awolowo University, Ile-Ife, Nigeria

DOI:

https://doi.org/10.4314/njt.v44i1.13

Keywords:

Data Analytics, Hierarchical Clustering, Random Forest Algorithm, Fertilizer Recommendation, Crop Recommendation

Abstract

Specific recommendations of crop and fertilizer are two critical parts of developing effective agricultural and food policies in Nigeria and other parts of the world. One of the main problems that has negatively affected crop production is the depletion of soil nutrients. Hence maintaining soil nutrients has become a significant concern for farmers. Although fertilizers can be applied manually to increase crop production, it is not optimal since different crops in different fields require different amounts of fertilizer due to soil types, soil fertility levels, and nutrient needs. To effectively and efficiently improve and maintain soil fertility, it is necessary to replace the traditional trial and error method of Nitrogen (N) Potassium (P) and Phosphorus (K) variation at different ratios on untested soils (which most times leads to poor crop yield) with soil testing and fertilizer recommendation using data mining algorithms. This study developed a model to recommend crop and fertilizer using two machine learning algorithms. The RF algorithm, which has shown high level of accuracy in many different agricultural applications, is used for recommending crops, while the hierarchical Clustering algorithm is used for fertilizer recommendation. The models used Crop nutrient requirement and soil sample data for training and testing. The RF and hierarchical algorithm were trained to recommend crop and fertilizer on the basis of multiple biophysical variables and soil nutrients. The system was found effective in recommending crop and fertilizer with an accuracy of 99.70%. The results showed that the model performed effectively and it is versatile machine-learning model for recommending crop and fertilizer due to the high accuracy and precision values. This research pointed out various steps in which a crop and fertilizer recommendation system was achieved using a random forest and hierarchical Clustering algorithms.

Author Biographies

  • S. S. Nandom, Department of Computer Science, Federal University Wukari, Taraba, Nigeria

    Computer Science department

    Assistant Lecturer

  • G. T. Abe, Department of Computer Science, Federal University Wukari, Taraba, Nigeria

    Computer Science Department

    Assistant lecturer

  • I. P. Gambo, Department of Computer Science and Engineering Obafemi Awolowo University, Ile-Ife, Nigeria

    Computer Science and Engineering department

    Senior Lecturer

    Obafemi Awolowo University, ile-ife

     

References

[1] Yemefack, M. “Preserving Soil Fertility for Ensuring Food Security in Africa”, in proceedings of the American Association for the Advancement of Science, Chicago, 2014. https://www.researchgate.net/publication/ 2684 45205_Preserving_Soil_Fertility-Ensuring-Fo od_Security_in_Africa.

[2] Nair, P. K. R., Kumar, B. M., Nair, V. D. “Soil Organic Matter (SOM) and Nutrient Cycling. In: An Introduction to Agroforestry”, Springer, Cham. 2021. https://doi.org/10.1007/978-3-030 -75358-0_16

[3] Yange, T. S., Egbunu, C. O., Rufai, M. A., Onyekwere, O., Abdulrahman, A. A., Abdulkadri, I. “Using Prescriptive Analytics for the Determination of Optimal Crop Yield”, In: International Journal of Data Science and Analysis, 6(3), 72; 2020.

[4] Dimkpa, C., Adzawla, W., Pandey, R., Atakora, W. K., Kouame, A. K., Jemo, M., and Bindraban, P. S. "Fertilizers for food and nutrition security in sub-Saharan Africa: An overview of soil health implications", Frontiers in Soil Science, vol. 3, Article 1123931, 2023. doi: 10.3389/fsoil.2023.1123931.

[5] Gamage, A., Gangahagedara, R., Gamage, J., Jayasinghe, N., Kodikara, N., Suraweera, P., and Merah, O. "Role of organic farming for achieving sustainability in agriculture", Farming System, vol. 1, no. 1, p. 100005, 2023. doi: 10.1016/j.farsys.2023.100005.

[6] Khatri, P., Kumar, P., Shakya, K. S., Kirlas, M. C., and Tiwari, K. K., "Understanding the intertwined nature of rising multiple risks in modern agriculture and food system," Environment, Development and Sustainability, vol. 26, pp. 24107–24150, 2024. doi: 10.1007/s10668-023-03638-7.

[7] Viviliya, B., and Vaidhehi, V. “The Design of Hybrid Crop Recommendation System using Machine Learning Algorithms”, In: International Journal of Innovative Technology and Exploring Engineering (IJITEE). 9(2), 4305-4311; 2019.

[8] Kaur, J., Ghai, N., Chahal, G. K., and Sandhu, S. "Characterization of maize inbred lines using principal component and cluster analysis for heat tolerance at the seedling stage under in vitro conditions", Cereal Research Communications, vol. 52, no. 4, pp. 1431–1442, 2024.

[9] Palaniraj, A., Balamurugan A.S., Durga, P. R., Pradeep, P. “Crop and Fertilizer Recommend-ation System using Machine Learning”, In: International Research Journal of Engineering and Technology (IRJET), 8(4): 319- 323, 2021.

[10] Chougule, A., Jha, V. J., Mukhnopadhyay, D. “Crop Suitability and Fertilizers Recommen-dation using Data Mining Techniques”, In: Progress in Advanced Computing and Intelligent Engineering, 714, 25–35, 2019; https://doi.org/10.1007/978-981-13-0224-4

[11] Schott, M. “Random Forest Algorithm for Machine Learning”, Medium, Capital One Tech, 2019; Retrieved from https://medium. com/capital-one-tech/random-forest-algorithm -for-machine-learning-c4b2c8cc9feb.

Downloads

Published

2025-04-14

Issue

Section

Computer, Telecommunications, Software, Electrical & Electronics Engineering

How to Cite

APPLICATION OF RANDOM FOREST AND HIERARCHICAL CLUSTERING MODELS FOR CROP AND FERTILIZER RECOMMENDATION TO FARMERS. (2025). Nigerian Journal of Technology, 44(1), 114-122. https://doi.org/10.4314/njt.v44i1.13