• Abstract

    Soil fertility is defined in terms of various nutrients present in the soil and has a direct impact on the sustained production of crops. Amongst various nutrients, nitrogen (N), phosphorous (P), and potassium (K), all together NPK, play the most significant role in gross crop yield. Precise estimation of the fertility status of existing soil NPK is the most significant task for proper fertilizer management. Traditionally, the fertility status of NPK is estimated by chemical analysis, which is expert- dependent and expensive for field applications. Thus, rural farmers apply various fertilizers without estimating the current fertility status of the nutrients, which leads to a nutrient imbalance and a serious threat to sustainable agriculture. Instead, several traditional machine learning models have been suggested for estimating the fertility status of various soil nutrients. However, they have some major limitations with poor performances. Conversely, the stacked ensemble models are more stable and robust compared to base learners with better predictive accuracy. Several successful applications of such models have been reported. However, no stacked ensemble model has been designed for estimating the fertility status of NPK using a trustworthy soil data repository. This paper proposes a novel architecture of a stacked ensemble model for precise estimation of the fertility status of three macronutrients, NPK. The novelty of this work is that the architecture of the existing stacked ensemble models has been restructured by incorporating an additional preprocessing module along with a data feedback technique to boost up the performance. Undoubtedly, a web-based version of such a model will be beneficial for rural farmers and agricultural decision-makers when accessed using smartphones. Our proposed model was experimentally validated using authentic field datasets. Empirical results revealed that our proposed model outperformed all other existing models both in terms of average accuracy (0.8457) and average Cohen’s kappa (0.6114).

  • References

    1. Akyol, K. (2020). Stacking ensemble based deep neural networks modeling for effective epileptic seizure detection. Expert Systems with Applications, 148, 113239. https://doi.org/10.1016/j.eswa.2020.113239
    2. Behera, B., Kumaravelan, G., & Kumar, P. (2019). Performance evaluation of deep learning algorithms in biomedical document classification. In Proceedings of the 11th International Conference on Advanced Computing, ICoAC 2019 (p.220-224). Chennai, India. https://doi.org/10.1109/ICoAC48765.2019.246843
    3. Chaudhry, H., Vasava, H. B., Chen, S., Saurette, D., Beri, A., Gillespie, A., & Biswas, A. (2024). Evaluating the soil quality index using three methods to assess soil fertility. Sensors, 24(3), 864. https://doi.org/10.3390/s24030864
    4. Chicco, D., Tötsch, N., & Jurman, G. (2021). The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation. BioData Mining, 14, 1–22. https://doi.org/10.1186/s13040-021-00244-z
    5. Department of Agriculture & Farmers Welfare (DAFW). (2021). Soil health card. Ministry of Agriculture and Farmers Welfare, Government of India. https://soilhealth.dac.gov.in/home. Accessed on August 20, 2022.
    6. Dong, X., Yu, Z., Cao, W., Shi, Y., & Ma, Q. (2020). A survey on ensemble learning. Frontiers of Computer Science, 14, 241-258. https://doi.org/10.1007/s11704-019-8208-z
    7. Elbeltagi, A., Kushwaha, N. L., Rajput, J., Vishwakarma, D. K., Kulimushi, L. C., Kumar, M., Zhang, J., Pande, C. B., Choudhari, P., Meshram, S. G., Pandey, K., Sihag, P., Kumar, N., & Abd-Elaty, I. (2022). Modelling daily reference evapotranspiration based on stacking hybridization of ANN with meta-heuristic algorithms under diverse agro-climatic conditions. Stochastic Environmental Research and Risk Assessment, 36(10), 3311-3334. https://doi.org/10.1007/s00477-022-02196-0
    8. Enkvetchakul, P., & Surinta, O. (2022). Stacking ensemble of lightweight convolutional neural networks for plant leaf disease recognition. ICIC Express Letters, 16(5), 521-528. https://doi.org/10.24507/icicel.16.05.521
    9. Escorcia-Gutierrez, J., Gamarra, M., Soto-Diaz, R., Pérez, M., Madera, N., & Mansour, R. F. (2022). Intelligent Agricultural Modelling of Soil Nutrients and pH Classification Using Ensemble Deep Learning Techniques. Agriculture, 12(7), 977. https://doi.org/10.3390/agriculture12070977
    10. Fabregas, R., Kremer, M., & Schilbach, F. (2019). Realizing the potential of digital development: The case of agricultural advice. Science, 366, eaay3038. https://doi.org/10.1126/science.aay3038
    11. Fan, J., Yue, W., Wu, L., Zhang, F., Cai, H., Wang, X., Lu, X., & Xiang, Y. (2018). Evaluation of SVM, ELM and four tree-based ensemble models for predicting daily reference evapotranspiration using limited meteorological data in different climates of China. Agricultural and forest meteorology, 263, 225-241. https://doi.org/10.1016/j.agrformet.2018.08.019
    12. Ganesh, D., Yeshwanth, K. J. A., Satheesh, M., Guru, M., Reddy, S. V., Chirudeep, T., Naveen, S., & Polisetty, K. (2022). Extreme learning mechanism for classification & prediction of soil fertility index. Journal of Pharmaceutical Negative Results, 13, 37-43. https://doi.org/10.47750/pnr.2022.13.S06.006
    13. Horf, M., Gebbers, R., Olfs, H. W., & Vogel, S. (2024). Determining nutrients, dry matter, and pH of liquid organic manures using visual and near-infrared spectrometry. Science of the Total Environment, 908, 168045. https://doi.org/10.1016/j.scitotenv.2023.168045
    14. Hosseini, M., Rajabi Agereh, S., Khaledian, Y., Jafarzadeh Zoghalchali, H., Brevik, E. C., & Movahedi Naeini, S. A. R. (2017). Comparison of multiple statistical techniques to predict soil phosphorus. Applied Soil Ecology, 114, 123–131. https://doi.org/10.1016/j.apsoil.2017.02.011
    15. Jia, X., Fang, Y., Hu, B., Yu, B., & Zhou, Y. (2023). Development of soil fertility index using machine learning and visible-near-infrared spectroscopy. Land, 12(12), 2155. https://doi.org/10.3390/land12122155
    16. Kim, D., Yu, H., Lee, H., Beighley, E., Durand, M., Alsdorf, D. E., & Hwang, E. (2019). Ensemble learning regression for estimating river discharges using satellite altimetry data: Central Congo River as a Test-bed. Remote sensing of environment, 221, 741-755. https://doi.org/10.1016/j.rse.2018.12.010
    17. Kumar Chauhan, D., Kumar Tripathi, D., Pratap Singh, V., Mohan Prasad, S., & Dubey, N. K. (2014). Role of macronutrients in plant growth and acclimation: Recent advances and future prospective. In Improvement of Crops in the Era of Climatic Changes (p. 197-216). Springer New York. https://doi.org/10.1007/978-1-4614-8824-8_8
    18. Liberty, E., Lang, K., & Shmakov, K. (2016). Stratified sampling meets machine learning. In International conference on machine learning (p. 2320-2329). PMLR.
    19. Malek, N. H. A., Yaacob, W. F. W., Nasir, S. a. M., and Shaadan, N. (2022). Prediction of water quality classification of the Kelantan River Basin, Malaysia, using machine learning techniques. Water, 14(7), 1067. https://doi.org/10.3390/w14071067
    20. Mammadov, E., Denk, M., Mamedov, A. I., & Glaesser, C. (2024). Predicting Soil Properties for Agricultural Land in the Caucasus Mountains Using Mid-Infrared Spectroscopy. Land, 13(2), 154-154. https://doi.org/10.3390/land13020154
    21. Marschner, H. (2011). Marschner’s mineral nutrition of higher plants (3rd ed.). Academic Press.
    22. Mengel, K. (1987). Principles of plant nutrition. International Potash Institute.
    23. Metzger, K., Liebisch, F., Herrera, J. M., Guillaume, T., Walder, F., & Bragazza, L. (2024). The use of visible and near-infrared spectroscopy for in-situ characterization of agricultural soil fertility: A proposition of best practice by comparing scanning positions and spectrometers. Soil Use and Management, 40(1), e12952. https://doi.org/10.1111/sum.12952
    24. Nduwamungu, C., Ziadi, N., Parent, L. É., Tremblay, G. F., & Thuriès, L. (2009). Opportunities for, and limitations of, near infrared reflectance spectroscopy applications in soil analysis: A review. Canadian Journal of Soil Science, 89(5), 531-541.
    25. Nti, I. K., Zaman, A., Nyarko-Boateng, O., Adekoya, A. F., & Keyeremeh, F. (2023). A predictive analytics model for crop suitability and productivity with tree-based ensemble learning. Decision Analytics Journal, 8, 100311. https://doi.org/10.1016/j.dajour.2023.100311
    26. Nursu’aidah, H., Motior, M. R., Nazia, A. M., and Islam, M. A. (2014). Growth and photosynthetic responses of long bean (Vigna unguiculata) and mung bean (Vigna radiata) to fertilization. The Journal of Animal and Plant Sciences, 24(2), 573–578. https://www.researchgate.net/publication/286770664_Growth_and_photosynthetic_responses_of_long_bean_Vigna_unguiculata_and_mung_bean_Vigna_radiata_response_to_fertilization
    27. Owen, L. (2022). Hyperparameter tuning with Python: Boost your machine learning model’s performance via hyperparameter tuning. Packt Publishing Ltd.
    28. Pant, J., Pant, P., Pant, R. P., Bhatt, A., Pant, D., & Juyal, A. (2021). Soil quality prediction for determining soil fertility in Bhimtal block of Uttarakhand (India) using machine learning. International Journal of Analysis and Applications, 19(1), 91-109. https://doi.org/10.28924/2291-8639
    29. Patil, P. L., Kuligod, V. B., Gundlur, S. S., Katti, J., Nagaral, I. N., Shikrashetti, P., Geetanjali, H. M., & Dasog, G. S. (2016). Soil fertility mapping in Dindur sub-watershed of Karnataka for site-specific recommendations. Journal of the Indian Society of Soil Science, 64(4), 381-390. https://doi.org/10.5958/0974-0228.2016.00050.5
    30. Pavitha, N., & Sugave, S. (2023). A Novel Multi-Stage Stacked Ensemble Classifier using Heterogeneous Base Learners. International Journal of Engineering Trends and Technology, 71(4), 65-71. https://doi.org/10.14445/22315381/IJETT-V71I4P206
    31. Pettigrew, W. T. (2008). Potassium influences on yield and quality production for maize, wheat, soybean, and cotton. Physiologia Plantarum, 133(4), 670–681. https://doi.org/10.1111/j.1399-3054.2008.01073.x
    32. Qaadan, S., Alshare, A., Ahmed, A., and Altartouri, H. (2025). Stacked ensembles powering smart farming for imbalanced sugarcane disease detection. Applied Sciences, 15(5), 2788. https://doi.org/10.3390/app15052788
    33. Rajagopal, S., Kundapur, P. P., & Hareesha, K. S. (2020). A stacking ensemble for network intrusion detection using heterogeneous datasets. Security and Communication Networks, 2020(1), 4586875. https://doi.org/10.1093/bib/bbab172
    34. Raju, C., Ashoka, D. V., & BV, A. P. (2024). CropCast: Harvesting the future with interfused machine learning and advanced stacking ensemble for precise crop prediction. Kuwait Journal of Science, 51(1), 100160. https://doi.org/10.1016/j.kjs.2023.11.009
    35. Ramesh, V., and Kumaresan, P. (2025). Stacked ensemble model for accurate crop yield prediction using machine learning techniques. Environmental Research Communications, 7(3), 035006. https://doi.org/10.1088/2515-7620/adb9c0
    36. Renju, K., & Brunda, V. (2024). Optimizing crop yield prediction through multiple models: an ensemble stacking approach. International Journal of Data Informatics and Intelligent Computing, 3(2), 52-58. https://doi.org/10.59461/ijdiic.v3i2.120
    37. Reshma, S. J., & Aravindhar, D. J. (2022). A systematic approach of classifying soil & crop nutrient using machine learning algorithms. International Journal of Intelligent Systems and Applications in Engineering, 10(2S), 174-179. Retrieved from https://www.ijisae.org/index.php/IJISAE/article/view/2380
    38. Sarkar, U., Banerjee, G., and Ghosh, I. (2022). A machine learning model for estimation of village level soil nutrient index. Indian Journal of Science and Technology, 15(36), 1815–1822. https://doi.org/10.17485/ijst/v15i36.851
    39. Sarkar, U., Sharma, M., Dixit, S., Das, J., Banerjee, G., & Ghosh, I. (2023). Estimation of soil macronutrients using voting classifiers. In Proceedings of International Conference on Communication and Computational Technologies: Algorithms for Intelligent Systems (p. 779-788). Jaipur, India. https://doi.org/10.1007/978-981-19-3951-8_59
    40. Sengupta, A. & Sonwani, D. (2012). Sustainable development in India with reference to agricultural sector. International Journal of Emerging Research in Management & Technology, 1(2), 24-29.
    41. Sheth, V., Tripathi, U., and Sharma, A. (2022). A Comparative analysis of Machine learning Algorithms for classification purpose. Procedia Computer Science, 215, 422–431. https://doi.org/10.1016/j.procs.2022.12.044
    42. Sirsat, M. S., Cernadas, E., Fernández-Delgado, M., & Khan, R. (2017). Classification of agricultural soil parameters in India. Computers and Electronics in Agriculture, 135, 269-279. https://doi.org/10.1016/j.compag.2017.01.019
    43. Sokolova, M., Japkowicz, N., & Szpakowicz, S. (2006). Beyond accuracy, F-score and ROC: A family of discriminant measures for performance evaluation. In Australasian joint conference on artificial intelligence (p. 1015-1021). Berlin, Heidelberg.
    44. Suchithra, M. S., & Pai, M. L. (2020). Improving the prediction accuracy of soil nutrient classification by optimizing extreme learning machine parameters. Information Processing in Agriculture, 7(1), 72-82. https://doi.org/10.1016/j.inpa.2019.05.003
    45. Sunori, S. K., Negi, P. B., Garia, P., Arora, S., Lohani, M. C., Mittal, A., & Juneja, P. (2022). Design of ANN-based classifiers for soil fertility of Uttarakhand. In 3rd International Conference for Emerging Technology (INCET) (p. 1-5). Belgaum, India. https://doi.org/10.1109/INCET54531.2022.9825273
    46. Sunori, S. K., Negi, P. B., Joshi, N. C., Mittal, A., & Juneja, P. (2024). Soil fertility assessment using ensemble methods in machine learning. In Proceedings of the 5th International Conference on Intelligent Communication Technologies and Virtual Mobile Networks, ICICV 2024, (p. 17-21). Tirunelveli, India. https://doi.org/10.1109/ICICV62344.2024.00010
    47. Tallón-Ballesteros, A. J., & Riquelme, J. C. (2014). Data mining methods applied to a digital forensics task for supervised machine learning. In Muda, A., Choo, YH., Abraham, A., N. Srihari, S. (eds) Computational Intelligence in Digital Forensics: Forensic Investigation and Applications. Studies in Computational Intelligence (pp. 413-428). Springer. https://doi.org/10.1007/978-3-319-05885-6_17
    48. Wang, L., and Gao, Y. (2025). Estimating and downscaling ESA-CCI soil moisture using Multi-Source remote sensing images and Stacking-Based ensemble learning algorithms in the Shandian River Basin, China. Remote Sensing, 17(4), 716. https://doi.org/10.3390/rs17040716
    49. Wolpert, D. H. (1992). Stacked generalization. Neural networks, 5(2), 241-259. https://doi.org/10.1016/S0893-6080(05)80023-1
    50. Wu, T., Zhang, W., Jiao, X., Guo, W., & Hamoud, Y. A. (2020). Comparison of five Boosting-based models for estimating daily reference evapotranspiration with limited meteorological variables. Plos One, 15(6), e0235324. https://doi.org/10.1371/journal.pone.0235324
    51. Xu, C., Xu, X., Liu, M., Yang, J., Zhang, Y., & Li, Z. (2017). Developing pedotransfer functions to estimate the S-index for indicating soil quality. Ecological Indicators, 83, 338-345. https://doi.org/10.1016/j.ecolind.2017.08.011
    52. Zekri, M., & Obreza, T. A. (2003). Plant Nutrients for Citrus Trees: SL 200/SS419, 1/2003. EDIS, 2003(2). https://doi.org/10.32473/edis-ss419-2003
    53. Zhang, H., Wu, P., Yin, A., Yang, X., Zhang, M., & Gao, C. (2017). Prediction of soil organic carbon in an intensively managed reclamation zone of eastern China: A comparison of multiple linear regressions and the random forest model. Science of the Total Environment, 592, 704-713. https://doi.org/10.1016/j.scitotenv.2017.02.146
    54. Zhang, L., Huang, Z., and Zhang, X. (2025). Stacking Ensemble Learning Method for Quantitative Analysis of Soluble Solid Content in Apples. Journal of Chemometrics, 39(1), e3635.
    55. Zhang, X., Liu, D., Ma, J., Wang, X., Li, Z., & Zheng, D. (2024). Visible near-infrared hyperspectral soil organic matter prediction based on combinatorial modeling. Agronomy, 14(4), 789. https://doi.org/10.3390/agronomy14040789
    56. Zolfaghari, A. A., Abolkheiryan, M., Soltani-Toularoud, A. A., Taghizadeh-Mehrjardi, R., & Weldeyohannes, A. O. (2020). Prediction of soil macronutrients using fractal parameters and artificial intelligence methods. Spanish Journal of Agricultural Research, 18(2), 1-13. https://doi.org/10.5424/sjar/2020182-15460
    57. Zounemat-Kermani, M., Stephan, D., Barjenbruch, M., & Hinkelmann, R. (2020). Ensemble data mining modeling in corrosion of concrete sewer: A comparative study of network-based (MLPNN & RBFNN) and tree-based (RF, CHAID, & CART) models. Advanced Engineering Informatics, 43, 101030. https://doi.org/10.1016/j.aei.2019.101030

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Copyright (c) 2025 The Authors

How to cite

Sarkar, U., Banerjee, G., & Ghosh, I. (2025). Estimation of NPK from soil data using a novel stacked ensemble model. Multidisciplinary Science Journal, 7(12), 2025610. https://doi.org/10.31893/multiscience.2025610
  • Article viewed - 970
  • PDF downloaded - 350