Soil Classification & Prediction of Crop Status with Supervised Learning Algorithm: Random Forest


  • Bakhtawer Bakhtawer Department of Computer System Engineering, Mehran University of Engineering & Technology, Pakistan
  • Bushra Naz Department of Computer System Engineering, Mehran University of Engineering & Technology, Pakistan
  • Naseer U Din Department of Computer System Engineering, Mehran University of Engineering & Technology, Pakistan
  • Waqar Ahmed Department of Computer & Information engineering, NED University of Engineering & Technology, Karachi, Pakistan


CMS, Crop Precision, NPK, Random Forest, Soil Classification


Crop Management System (CMS) was developed in an Ionic framework with a Real-Time Firebase database for loop backing and decision support. The main two features were; Soil classification where the soil was classified based on temperature, humidity, and soil properties such as soil moisture, soil nutrients, and soil PH level using Random Forest Algorithm. By Bootstrap method using Random Forest, samples from the dataset were selected & then classification trees was generated. The other feature was crop precision where the condition of the crop was and examined using temperature, humidity, soil moisture, soil PH levels, and soil nutrients (N, P, K). IoT device was used to fetch data from the field and then compare with already stored ideal values, suitable for optimal yield, in CMS database then process using the application to suggest the crop for cultivation and to optimize the usage of water and fertilizers. Currently, we classify the soil using Random Forest Algorithm & suggest the suitable crop for the classified type of soil & also measure the soil moisture and soil nutrients of agricultural field Acre based on the reading results we are suggesting the crop to is cultivated and pre-requisite which would be needed in future. The proposed method gives an accuracy of 96.5% as compared to existing methods of Artificial Neural Networks and Support Vector Machines.


Njoroge, Bryan Mungai, Thang Ka Fei, and Vinesh Thiruchelvam. "A research review of precision farming techniques and technology." J. Appl. Technol. Innov 2, no. 9 (2018).

Dos Santos, H. G., PK T. Jacomine, L. H. C. Dos Anjos, V. A. De Oliveira, J. F. Lumbreras, M. R. Coelho, J. A. De Almeida, J. C. de Araujo Filho, J. B. De Oliveira, and T. J. F. Cunha. "Brazilian Soil Classification System." (2018).

Bu, Fanyu, and Xin Wang. "A smart agriculture IoT system based on deep reinforcement learning." Future Generation Computer Systems 99 (2019): 500-507.

Abdul Karim Mirjat, Fahima A. Umrani, Nayar Hussain Mirjat, Arsalan Hussain, Biby Sindhu. “Precision Agriculture & Crop Management System with Android Application & Web Development.” Energy, Environment and Sustainable Development 2018 (EESD 2018).

Prathibha, S. R., Anupama Hongal, and M. P. Jyothi. "IoT based monitoring system in smart agriculture." In 2017 International Conference on Recent Advances in Electronics and Communication Technology (ICRAECT), pp. 81-84. IEEE, 2017.

Suma, N., Sandra Rhea Samson, S. Saranya, G. Shanmugapriya, and R. Subhashri. "IOT based smart agriculture monitoring system." International Journal on Recent and Innovation Trends in computing and communication 5, no. 2 (2017): 177-181.

Lee, Meonghun, Jeonghwan Hwang, and Hyun Yoe. "Agricultural production system based on IoT." In 2013 IEEE 16Th international conference on computational science and engineering, pp. 833-837. IEEE, 2013.

S. Yoo, J. Kim, T. Kim, S. Ahn, J. Sung, D. Kim,” A2S: Automated Agriculture System Based on WSN”. In Proceedings of ISCE 2007. IEEE International Symposium on Consumer Electronics, Irving, TX, USA, 20-23 June 2007.

Balli, Serkan, Ensar Arif Sağbaş, and Musa Peker. "Human activity recognition from smart watch sensor data using a hybrid of principal component analysis and random forest algorithm." Measurement and Control 52, no. 1-2 (2019): 37-45.

ARİF ÖZYANKI et al. Soil Classification By Using Artificial Neural Networks. NEAR EAST UNIVERSITY.Thesis

Barman, Utpal, and Ridip Dev Choudhury. "Soil texture classification using multi class support vector machine." Information Processing in Agriculture 7, no. 2 (2020): 318-332.

Saranya, N., and A. Mythili. "Soil Classification and Harvest Proposal Implemented using Machine Learning Techniques."

J. Balendonck, J. Hemming, B.A.J. van Tuijl, L. Incrocci, A. Pardossi, P. Marzialetti, (2008). "Sensors and Wireless Sensor Networks for Irrigation Management under Deficit Conditions (FLOW-AID)", coordinated by Wageningen University and Research Centre in the Netherlands, 2008.

The Basics of Fertilizer Calculations for Greenhouse Crops By Joyce G. Latimer, Extension Specialist, Greenhouse Crops; Virginia Tech (publication 430-100).

Akriti Jain, Abizer Saify, Vandana Kate, “Prediction of Nutrients (N, P, K) in soil using Color Sensor (TCS3200)”. International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-9 Issue-3, January 2020.

Cheng, Yiben, Yanli Li, Hongbin Zhan, Hairong Liang, Wenbin Yang, Yinming Zhao, and Taojia Li. "New comparative experiments of different soil types for farmland water conservation in arid regions." Water 10, no. 3 (2018): 298.

CW van Huyssteen, DP Turner & PAL Le Roux .2013. Principles of soil classification and the future of the South African system, South African Journal of Plant and Soil, 30(1): 23-32.

ZHANG Wei-Li, XU Ai-Guo, ZHANG Ren-Lian.2014. Review of Soil Classification and Revision of China Soil Classification System. ScientiaAgriculturaSinica, 47(16): 3214-3230

Shravani, Uday Kiran, Yashaswini J, and Priyanka. 2020. Soil Classification And Crop Suggestion Using Machine Learning. International Research Journal of Engineering and Technology (IRJET)

Nidhi H Kulkarni , Dr. G N Srinivasan , Dr. B M Sagar, Dr.N K Cauvery,2018. Improving Crop Productivity through A Crop Recommendation System Using Ensembling Technique.

Gholap, J., Ingole, A., Gohil, J., Gargade, S. and Attar, V., 2012. Soil data analysis using classification techniques and soil attribute prediction. arXiv preprint arXiv:1206.1557.

Misra, Siddharth, and Hao Li. "Noninvasive fracture characterization based on the classification of sonic wave travel times." Machine Learning for Subsurface Characterization (2019): 243-287.

Han, Te, Dongxiang Jiang, Qi Zhao, Lei Wang, and Kai Yin. "Comparison of random forest, artificial neural networks and support vector machine for intelligent diagnosis of rotating machinery." Transactions of the Institute of Measurement and Control 40, no. 8 (2018): 2681-2693.

Sakunthala, S., R. Kiranmayi, and P. Nagaraju Mandadi. "A review on artificial intelligence techniques in electrical drives: Neural networks, fuzzy logic, and genetic algorithm." In 2017 International Conference On Smart Technologies For Smart Nation (SmartTechCon), pp. 11-16. IEEE, 2017.

Nayak, Janmenjoy, Bighnaraj Naik, and H. Behera. "A comprehensive survey on support vector machine in data mining tasks: applications & challenges." International Journal of Database Theory and Application 8, no. 1 (2015): 169-186.




How to Cite

Bakhtawer, B., Bushra Naz, Naseer U Din, & Waqar Ahmed. (2022). Soil Classification & Prediction of Crop Status with Supervised Learning Algorithm: Random Forest . International Journal of Innovations in Science & Technology, 4(4), 1011–1022. Retrieved from

Most read articles by the same author(s)