Drought Prediction and Crop recommendation
Introduction
India is been hugely impacted by droughts. In recent studies, since 2015 nearly 500 million people have directly or indirectly been affected by droughts. Kurnool which is located in Andhra Pradesh is one of the major drone-prone areas in the country. In 2019, the government declared that around 50 mandals out of 54 were hit by droughts, many residents have been migrated to different cities. To address this issue, I focused on this region to estimate the drought severity. India is one of the oldest countries that is still practicing agriculture. In recent years, many factors have affected agriculture in India. Moreover, many farmers suffer crop damage due to unawareness or lack of experience. Many techniques are used to improve the crop yielding but the one which gave the most profit is precision agriculture. Precision agriculture is nothing but the farmers instead of completely depending on their knowledge and experience, instead are looking for some precise methods using technology to improve their yield. To solve that problem i.e. to get good crop yield I have built a recommendation model that can predict based on soil conditions and weather conditions.
My approach
To begin with, there are several other papers that can predict the drought and recommend the crops, but I have done it for the specific region called Kurnool, Andhra Pradesh. Firstly, I have Prepared the data from the Andhra Pradesh government website for droughts, and for crops, I used the dataset from kaggle.com.
To begin with drought prediction, the data set is prepared by collecting the raw data from the government website and been preprocessed using various machine learning techniques like identifying missing values, duplicate values, extract the dependent variable, and also finding min-max using sklearn library. Here the data set consists of factors like date, temperature, precipitation, evapotranspiration, humidity, soil temperature, soil moisture. Moreover, the classes for the severity of drought are drought severity no drought, less drought, neutral, drought, and most drought. Moreover, for crop recommendation, the dataset is been preprocessed by identifying the missing values, duplicate values, finding min-max using sklearn. The dataset consists of several factors like Potassium, Nitrogen, Phosphorus, ph of the soil and temperature, humidity, rainfall. For this crop recommendation, the classes of crops are rice, maize, chickpea, kidney beans, pigeon peas, moth beans, mung bean, black gram, lentil, pomegranate, banana, mango, grapes, watermelon, muskmelon, apple, orange, papaya, coconut, cotton, jute, coffee.
Taking all these considerations, I have used ensemble learning methods to get good accuracy. I have Used Various ML Techniques Like the random forest, Naïve Bayes, Decision tree classifier, SVM, XGboost, and logistic regression and compared each. Finally, I have achieved a good accuracy of 97.7% for drought severity with random forest and 98% for crop recommendation with naïve Bayes.
After the models created, I built a UI for this where the user can be interacted. I stored the model in the .pickle file and connected it to the front end using flask. These are the accuracies achieved from various models
Below images are the accuracies achieved from various models and the heat map of the crop recommendation.
Future enhancements
In the future, I like to expand this to more areas where there are severe droughts. Using neural networks for the large dataset that I decided to use. Moreover, there is the scope of enhancement in the experiment by using various other models like Gaussian, neural networks, etc. The accuracy might vary by applying various other pre-processing techniques and tools which can be explored further. Neural networks can be altered in numerous ways by which we can change the layers, and also neurons in each level or step can be changed, different activation functions can be tried on different layers and the density of the network can be altered. The optimizer and the batch size also can be altered and checked for better accuracy. Furthermore, the number of trees can be changed in the decision tree, bagging and boosting algorithms and dimensionality reduction or feature selection methods can be tried on to get an increase in the accuracy. The UI can be improvised and can be made very sophisticated one where the users can have a great experience in using the application.
Acknowledgment:
We would like to thank Dr. Deepak Garg, Dr. Indrajeet Gupta, and Dr. Kuldeep for guiding us through the development of the project.
Thank you for reading my blog.
Pola Sumanth
B.Tech 4th year CSE student,
Bennett University.