Enhancing crop recommendation systems with explainable artificial intelligence: a study on agricultural decision-making

  • Original Article
  • Open access
  • Published: 11 January 2024
  • Volume 36 , pages 5695–5714, ( 2024 )

Cite this article

You have full access to this open access article

  • Mahmoud Y. Shams 1 ,
  • Samah A. Gamel 2 &
  • Fatma M. Talaat   ORCID: orcid.org/0000-0001-6116-2191 1 , 3 , 4  

3792 Accesses

Explore all metrics

Crop Recommendation Systems are invaluable tools for farmers, assisting them in making informed decisions about crop selection to optimize yields. These systems leverage a wealth of data, including soil characteristics, historical crop performance, and prevailing weather patterns, to provide personalized recommendations. In response to the growing demand for transparency and interpretability in agricultural decision-making, this study introduces XAI-CROP an innovative algorithm that harnesses eXplainable artificial intelligence (XAI) principles. The fundamental objective of XAI-CROP is to empower farmers with comprehensible insights into the recommendation process, surpassing the opaque nature of conventional machine learning models. The study rigorously compares XAI-CROP with prominent machine learning models, including Gradient Boosting (GB), Decision Tree (DT), Random Forest (RF), Gaussian Naïve Bayes (GNB), and Multimodal Naïve Bayes (MNB). Performance evaluation employs three essential metrics: Mean Squared Error (MSE), Mean Absolute Error (MAE), and R-squared (R2). The empirical results unequivocally establish the superior performance of XAI-CROP. It achieves an impressively low MSE of 0.9412, indicating highly accurate crop yield predictions. Moreover, with an MAE of 0.9874, XAI-CROP consistently maintains errors below the critical threshold of 1, reinforcing its reliability. The robust R 2 value of 0.94152 underscores XAI-CROP's ability to explain 94.15% of the data's variability, highlighting its interpretability and explanatory power.

Similar content being viewed by others

crop recommendation research paper

Intelligent Crop Recommender System for Yield Prediction Using Machine Learning Strategy

Atchukatla Maheswary, Sanam Nagendram, … Ahmed Nabih Zaki Rashed

crop recommendation research paper

Revolutionizing Somali agriculture: harnessing machine learning and IoT for optimal crop recommendations

Mohamed Omar Abdullahi, Abdukadir Dahir Jimale, … Abdulaziz Yasin Nageye

crop recommendation research paper

Voting Classifier-Based Crop Recommendation

Raswitha Bandi, M. Sai Surya Likhit, … Vempati Sai Venkat

Avoid common mistakes on your manuscript.

1 Introduction

According to the Food and Agriculture Organization of the United Nations (FAO), agriculture is a significant sector in the economics of African nations, with approximately two-thirds of workers employed in this sector. Reforming agriculture in Africa is believed to be essential to eradicate poverty, hunger, and malnutrition [ 1 ]. However, the changing climate poses a challenge to the agricultural sector, with changing rainfall patterns, droughts, floods, and the spread of pests and diseases affecting crop production [ 2 ]. Therefore, predicting crop yield has become a difficult issue in precision agriculture. This is due to different variables especially the crop yield with the effect of climate change. Climate change is one of the major factors that can affect crop yields, making it essential to develop accurate predictive models to anticipate its effect. The changing environmental conditions, particularly global warming, and climate variability, have a negative impact on the future of agriculture. These factors, combined with other variables such as climate, weather, soil, fertilizer use, and seed variety, necessitate the use of multiple datasets to address this complex problem [ 3 ]. Traditionally, predicting crop production has relied on statistical models, which can be time-consuming and arduous. However, the introduction of big data in recent years has opened up new possibilities for more advanced analysis methods, such as machine learning [ 4 ]. Machine learning models can be categorized as either descriptive or predictive, depending on the research questions and challenges at hand. Predictive models are employed to forecast the future, while descriptive models are used to learn from the data and explain past events [ 5 , 6 , 7 , 8 ].

Anthropogenic climate change will have a more severe impact on the agricultural industry due to its dependence on weather [ 9 ]. In estimating yield for the purpose of assessing the effects of climate change, deterministic biophysical crop models are commonly used [ 10 ]. These models, which rely on detailed representations of plant physiology, are still valuable for analyzing response processes and possible adaptations [ 11 ]. However, statistical models generally outperform them in terms of prediction across wider spatial scales [ 12 ].

A significant body of literature, particularly since the work of Schlenker and Roberts [ 13 ], has employed statistical models to demonstrate a strong correlation between severe heat and below-average crop performance. Traditional econometric methods have been used in these studies. In recent work, crop model output has been incorporated into statistical models, and insights from crop models have been used to parameterize statistical models [ 14 , 15 ]. Meanwhile, machine learning approaches have made significant progress in the last few decades. Because it is primarily focused on outcome prediction rather than inference into the mechanical processes causing those outcomes, ML is conceptually distinct from much of classical statistics.

Crop Recommendation Systems (CRS) are computer-based tools that help farmers make informed decisions about which crops to plant based on factors such as soil type, weather patterns, and historical crop yields [ 16 , 17 , 18 ]. CRS can optimize crop yields while minimizing resource usage such as water, fertilizer, and pesticides. Machine learning models, such as decision trees, support vector machines, and neural networks, are commonly used in CRS, but these models are often considered "black boxes" with limited transparency and interpretability, which can reduce trust in the system.

Machine learning (ML) models are currently utilized for enhancing the early detection of diseases including different stages such as preprocessing, feature extraction and classification [ 19 ]. Furthermore, ML model used hyperparameter optimization techniques and ensemble learning algorithms to predict heart disease [ 20 ].

To address this issue, eXplainable artificial intelligence (XAI) has emerged as a subfield of AI that focuses on developing machine learning models that can provide clear explanations for their decisions. The numerical schemes facilitate the integration of integer and no integer tempered derivatives into ML and XAI algorithms, enabling the modeling and analysis of complex systems with long-range correlations and memory effects. This integration enhances the interpretability and predictive capabilities of ML and XAI models, allowing for a deeper understanding and effective decision-making in various domains, including agriculture, finance, and healthcare [ 21 , 22 , 23 ].

This study proposes an algorithm called "XAI-CROP" that leverages XAI to enhance the transparency and interpretability of CRS. XAI-CROP uses a decision tree algorithm trained on a dataset of crop cultivation in India to generate recommendations based on input data such as location, season, and production per square kilometer, area, and crop. The system provides clear explanations for its recommendations using the Local Interpretable Model-agnostic Explanations (LIME) technique, which helps farmers understand the reasoning behind the system's choices. The motivation behind the proposed algorithm "XAI-CROP" is to address the limitations of traditional Crop Recommendation Systems (CRS) that heavily rely on machine learning models, which are often considered "black boxes" due to their lack of transparency and interpretability. This lack of transparency reduces the trust that farmers may have in the system and hinders their understanding of the underlying decision-making process.

eXplainable artificial intelligence (XAI) has emerged as a subfield of AI that aims to develop machine learning models capable of providing clear explanations for their decisions. By incorporating XAI principles into CRS, the algorithm seeks to enhance the transparency and interpretability of the recommendations provided to farmers.

Research gap:

Limited transparency and interpretability of current crop recommendation systems.

Lack of clear explanations for the reasoning behind the system's choices.

The contribution of this paper is listed as follows:

Development of an algorithm called "XAI-CROP" that utilizes eXplainable artificial intelligence to enhance crop recommendation systems.

Improvement of transparency and interpretability in agricultural decision-making.

Provision of clear explanations for the system's recommendations, helping farmers understand the reasoning behind the choices.

The performance of XAI-CROP was assessed and compared to other crop recommendation systems.

XAI-CROP was found to have better accuracy and transparency compared to other systems.

Contribution to the growing body of research on the use of XAI in agriculture.

Insight into how the technology can be leveraged to address the challenges of food security and sustainable agriculture.

The structure of the paper is as follows: In Sect.  2 , we review the relevant literature pertaining to the subject. Section  3 outlines the proposed approach for addressing the research question. The experimental assessment is presented in Sect.  4 . Finally, Sect.  5 offers the concluding remarks for the paper.

2 Related work

Climate change pertains to persistent modifications in local or global temperatures or weather patterns. Addressing global warming and reducing greenhouse gas emissions is a challenging task complicated by the legal and regulatory difficulties associated with climate change [ 24 ]. As a result of global climate change, millions of people, particularly those in South Asia, Sub-Saharan Africa, and small islands, are expected to experience a rise in food insecurity, malnutrition, and hunger [ 25 ]. Climate change poses a major threat to African agricultural development [ 26 ]. Weather, temperatures, and air quality, which affect soil composition, have a significant impact on the quality of agricultural output. Therefore, it is crucial for the present generation to devise strategies to mitigate the adverse effects of environmental consequences on crop yields.

Researchers worldwide are continuing to study crop yield prediction closely [ 27 ]. You et al. [ 28 ] presented a deep learning framework for predicting crop yields using remote sensing data. They predicted crop yields annually in developing countries using a Convolutional Neural Network (CNN) combined with a Gaussian process component and dimensional reduction technique. They applied their method to a soybean dataset produced by merging soil, sensing, and climate data from the USA. The Gaussian approach was employed to reduce the Root Mean Square Error (RMSE) of the model, which improved from 6.27 to 5.83 on average with the Long Short-Term Memory (LSTM) model and from 5.77 to 5.57 with the CNN model.

In another study, Paudel et al. [ 29 ] used machine learning in combination with agronomic principles of crop modeling to establish a machine learning baseline for large-scale crop yield prediction. They started with a workflow that emphasized accuracy, modularity, and reuse. They created features using crop simulation outputs, as well as weather, remote sensing, and soil data from the MARS Crop Yield Forecasting System (MCYFS) database.

Sun et al. [ 30 ] utilized Gradient boosting, Support Vector Regression (SVR), and k-Nearest Neighbors to predict crop yields of soft wheat, spring barley, sunflower, sugar beet, and potato crops in the Netherlands, Germany, and France. To extract both temporal and spatial features, they proposed a multilevel deep learning model that combines Recurrent Neural Network (RNN) and Convolutional Neural Network (CNN). Their objective was to evaluate the effectiveness of the suggested approach for predicting Corn Belt yields in the USA and to investigate the impact of various datasets on the prediction task. Their experiments were conducted in the US Corn Belt states, where they used both time-series remote sensing data and data on soil properties as inputs. They predicted county-level corn yield from 2013 to 2016.

Yoon et al. [ 31 ] proposed an investigative study to demonstrate the effect of combining crop modeling and machine learning on improving corn yield predictions in the US Corn Belt. They aimed to determine if a hybrid approach (crop modeling + machine learning) can produce better predictions, identify the most accurate hybrid model combinations, and determine which aspects of crop modeling should be most effectively combined with machine learning to predict maize yield. Their study showed that weather information alone was insufficient and that adding simulation crop model variables as input features to machine learning models could reduce yield prediction RMSE from 7 to 20%. They suggested that for better yield predictions, their proposed machine learning models require more hydrological inputs.

Khaki and Wang [ 32 ] developed a Deep Neural Network-based solution to predict yield, check yield, and yield difference of corn hybrids, based on genotype and environmental (weather and soil) data. They participated in the 2018 Syngenta Crop Challenge and their submission was successful. Their model achieved an RMSE of 12% for the average yield and 50% for the standard deviation when predicting with weather data, indicating high accuracy. Abbas et al. [ 33 ] conducted a similar study on predicting potato tuber yield using four machine learning algorithms: linear regression, elastic net, k-nearest neighbor, and support vector regression. They utilized data on soil and crop properties obtained through proximal sensing for the prediction.

In a recent paper by Talaat [ 34 ], a new method called the Crop Yield Prediction Algorithm (CYPA) is introduced, which utilizes IoT technologies in precision agriculture to predict crop yield. The algorithm is designed to analyze the impact of various factors on crop growth, such as water and nutrient deficits, pests, and diseases, throughout the growing season. With big data databases that can store large amounts of data on weather, soils, and plant species, the CYPA can provide valuable insights for policymakers and farmers alike in anticipating annual crop yields. The study used five different machine learning models, each with optimal hyperparameter settings, to train and validate the algorithm. The DecisionTreeRegressor achieved a score of 0.9814, RandomForestRegressor scored 0.9903, and ExtraTreeRegressor scored 0.9933, indicating the high accuracy and effectiveness of the CYPA approach.

Table 1 presents the models that are commonly utilized in Crop Recommendation Systems, including Gradient Boosting (GB), Decision Tree (DT), Random Forest (RF), Gaussian Naïve Bayes (GNB), and Multimodal Naïve Bayes (MNB).

The comparison provided a clear and concise summary of the most commonly used models in Crop Recommendation Systems. It highlights the description, pros, and cons of each model, providing a good understanding of their strengths and limitations. The comparison highlights that Gradient Boosting, Random Forest, and Decision Tree are capable of handling different types of data, including numerical and categorical data. Gaussian Naïve Bayes and Multimodal Naïve Bayes are simple and fast algorithms that can handle high-dimensional data, but they may not perform well with correlated features. It also highlights the potential limitations of each model, such as overfitting or computational expenses. Overall, the comparison provides valuable insights into the tradeoffs that exist when selecting a model for a specific task in Crop Recommendation Systems.

3 XAI-CROP: eXplainable artificial intelligence for CROP recommendation systems

The proposed algorithm "XAI-CROP" is an eXplainable artificial intelligence (XAI) approach for enhancing the transparency and interpretability of Crop Recommendation Systems (CRS). The algorithm consists of five main phases as shown in Fig.  1 .

Data Preprocessing: In this phase, the input data, which includes soil type, weather patterns, and historical crop yields, are collected and processed for further analysis.

Feature Selection: The relevant features that affect crop yield are identified using statistical and machine learning techniques. These features are then used as input for the XAI-CROP model.

Model Training: The XAI-CROP model is trained on a dataset of crop cultivation in India, which includes information on crop yield, soil type, weather patterns, and historical crop yields. The model is based on a decision tree algorithm that generates recommendations based on the input data such as location, season, and production per square kilometer, area, and crop.

XAI Integration: The XAI-CROP model utilizes a technique called "Local Interpretable Model-agnostic Explanations" (LIME) to provide clear explanations for its recommendations. LIME is a technique for explaining the predictions of machine learning models by generating local models that approximate the predictions of the original model.

Validation: The XAI-CROP model is validated using a validation dataset to assess its performance in predicting crop yield. The model's accuracy is measured using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and R-squared (R2).

figure 1

The general block diagram of proposed algorithm "XAI-CROP"

3.1 Data preprocessing

The module for data preprocessing has the responsibility of gathering, sanitizing, and processing the acquired data. It leverages different data collection technologies like sensors, cameras, and IoT devices to obtain real-time data. After the data has been collected, it is scrubbed and processed to eliminate any inaccuracies or disturbances. Algorithm 1 depicts six primary steps involved in the Data Preprocessing Module. (i) Collect input data: Collect data on soil type, weather patterns, and historical crop yields from relevant sources. (ii) Data cleaning: Remove any duplicates or missing values in the data. (iii) Data transformation: Transform the data into a format that can be used for further analysis, such as converting categorical variables into numerical ones. (iv) Data integration: Combine the different datasets into a single dataset for analysis. (v) Data normalization: Normalize the data to ensure that all variables are on the same scale. This can be done using techniques such as min–max scaling or z-score normalization. (vi) Data splitting: Split the data into training and testing datasets for use in model training and validation.

3.2 Feature selection

The Feature Selection Module consists of six main steps as depicted in Algorithm 2: (i) Load the preprocessed dataset containing information on soil type, weather patterns, and historical crop yields. (ii) Split the dataset into training and testing sets. (iii) Apply statistical techniques such as correlation analysis, chi-square test, and ANOVA to identify features that have a significant impact on crop yield. (iv) Apply machine learning techniques such as Random Forest, Decision Trees, and Gradient Boosting to identify important features. (v) Rank the identified features based on their importance scores generated by the selected machine learning algorithm. (vi) Select the top n features that have the highest importance scores as input for the XAI-CROP model.

figure a

Data preprocessing Algorithm

figure b

Feature Selection Algorithm

3.3 Model training

The Model Training Module consists of seven main steps as depicted in Algorithm 3: (i) Load the preprocessed dataset containing information on crop yield, soil type, weather patterns, and historical crop yields. (ii) Split the dataset into training and testing sets using a predefined ratio. (iii) Instantiate a decision tree classifier and set the parameters for the algorithm. (iv) Train the decision tree classifier using the training dataset. (v) Evaluate the performance of the model on the testing dataset using various metrics such as accuracy, precision, recall, and F1-score. (vi) If the performance of the model is not satisfactory, tune the hyperparameters of the decision tree algorithm and retrain the model. (vii) Save the trained model for future use.

figure c

Model Training Algorithm

3.4 Hyperparameters tuning

The hyperparameters of the proposed model can be tuned using Gradient Boosting (GB), Decision Tree (DT), Random Forest (RF), Gaussian Naïve Bayes (GNB), and Multimodal Naïve Bayes (MNB).

In the gradient boosting, the model trained in sequential manner by minimizing the loss function of the whole system using Gradient Decent (GD) optimizer. Therefore, the GB provide more accurate prediction results by fit and update the new model parameters. Hence, a new base leaner is constructed and improve the negative gradient results from loss function related to the whole ensemble [ 35 , 36 ].

As the model improves, the weak learners are fitted in such a way that each new learner fits into the residuals of the preceding stage. The final model aggregates the results of each phase, resulting in a strong learner. The residuals are detected using a loss function. Mean Squared Error (MSE), for example, can be utilized for regression tasks, while logarithmic loss (log loss) can be used for classification tasks. It is worth mentioning that when a new tree is added to the model, the current trees do not alter as shown in Fig.  2 . The decision tree that was introduced fits the residuals from the present model [ 37 ].

figure 2

The general block diagram of Gradient Boosting algorithm

Hyperparameters are crucial elements of machine learning algorithms that can affect a model's accuracy and performance. In gradient boosting decision trees, two important hyperparameters are learning rate and n estimators. The learning rate, denoted as α, controls the speed at which the model learns. Each new tree changes the overall model, and the learning rate determines the magnitude of this change. A lower learning rate leads to slower learning, which benefits the model by making it more robust and efficient. Slower learning models have been shown to outperform faster ones in statistical learning. However, slower learning has a cost; it takes longer to train the model, which leads us to the next important hyperparameter. The number of trees used in the model is represented by n estimators. If the learning rate is low, more trees need to be trained. However, caution must be exercised when determining the number of trees to use. Using too many trees increases the risk of overfitting, which can lead to poor generalization performance of the model [ 38 ].

The Decision Tree (DT) technique is a supervised learning method that can be used for classification and regression tasks, and it is nonparametric. The DT has a hierarchical structure, which consists of a root node, internal nodes, branches, and leaf nodes. By performing a greedy search to identify the optimal split points in a tree, DT learning uses a divide and conquer approach. This splitting process is repeated recursively from top to bottom until all or most of the entries are categorized into specific class labels, as depicted in Fig.  3 . The complexity of the decision tree determines whether all data points are grouped into homogeneous sets. Smaller trees can easily achieve pure leaf nodes, or data points in a single class. However, as the tree becomes larger, it becomes increasingly difficult to maintain this purity, which often leads to too little data falling under a specific subtree, a phenomenon known as data fragmentation, and frequently results in overfitting. Pruning is a common technique used to reduce complexity and prevent overfitting. It involves removing branches that divide on attributes of low value. The model's accuracy can be assessed using the cross-validation method. Another approach to ensure the accuracy of decision trees is to create an ensemble using the Random Forest algorithm, which produces more precise predictions, especially when the individual trees are uncorrelated with one another [ 39 , 40 ].

figure 3

The general structure of Decision Tree

Random Forest (RF) is a machine learning algorithm that falls under the category of supervised learning and is widely used for regression and classification tasks. It creates decision trees on various samples of data and then combines them through a majority vote in classification and averaging in regression. One of the key advantages of the RF algorithm is its ability to handle datasets that have both continuous and categorical variables, making it suitable for both regression and classification problems. The algorithm has shown to produce superior results in classification tasks, as depicted in Fig.  4 [ 41 , 42 ].

figure 4

The general block diagram of Random Forest

Classical Naive Bayes is suitable for categorical data and models them as following a Multinomial Distribution. Gaussian Naive Bayes, on the other hand, is appropriate for continuous features and models them as following a Gaussian (normal) distribution. When dealing with completely categorical data, the conventional Naive Bayes classifier suffices, whereas the Gaussian Naive Bayes classifier is appropriate for data sets containing only continuous features. If the data set has both categorical and continuous characteristics, two options are available: discretizing the continuous features using bucketing or a similar technique or using a hybrid Naive Bayes model. Unfortunately, the conventional machine learning packages do not seem to offer such a model. In this study, we utilized continuous data, thus we employed GNB for our analysis. [ 43 , 44 ].

Multinomial Naive Bayes is a probabilistic learning approach that uses the Bayes theorem to calculate the likelihood of each tag for a given sample and selects the tag with the highest likelihood. The approach assumes that each feature being categorized is independent of any other feature, meaning that the presence or absence of one feature has no impact on the presence or absence of another. Naive Bayes is a powerful tool for analyzing text input and addressing multi-class problems. To apply the Naive Bayes theorem, one must first understand the Bayes theorem developed by Thomas Bayes, which estimates the likelihood of an event based on prior knowledge of its circumstances. Specifically, it computes the likelihood of class A when predictor B is provided. [ 45 , 46 ].

3.5 XAI integration module

The XAI Integration phase of the XAI-CROP algorithm uses Local Interpretable Model-agnostic Explanations (LIME) to provide clear explanations for the recommendations made by the XAI-CROP model. XAI Integration phase consists of six main steps as depicted in Algorithm 4: (i) Load the XAI-CROP model. (ii) Select a sample from the validation dataset for which to generate an explanation. (iii) Generate perturbations of the selected sample to create a dataset for local model training. (iv) Train a linear regression model on the perturbed dataset. (v) Calculate the weight of each feature in the local model. (vi) Generate an explanation by highlighting the features that contribute the most to the XAI-CROP model's prediction for the selected sample.

figure d

XAI Integration Algorithm

3.6 Validation module

The Validation phase of the XAI-CROP algorithm is a crucial component, encompassing three main steps that are depicted in Algorithm 5. These steps are designed to ensure the robustness and reliability of the model's predictions, while also facilitating the interpretability and explainability of the results.

figure e

Validation Algorithm

4 Implementation and evaluation

This section presents an overview of the datasets used, performance metrics employed, and evaluation methodology adopted.

4.1 Software

In this study, various software tools were used, such as the Python programming language, LIME library for explainable AI, Pandas library for data manipulation and analysis, and Scikit-learn library for machine learning models and evaluation metrics. The choice of Python as the programming language was based on its versatility, user-friendliness, and the availability of numerous libraries for data analysis and machine learning. LIME was utilized to improve the interpretability of the machine learning models used in the study, allowing researchers to comprehend how these models generate predictions.

4.2 Crop yield dataset

The Crop Yield dataset [ 47 ] used in this study provides valuable information about crop cultivation in India. This dataset was used to develop a crop recommendation system to assist farmers in selecting the most appropriate crop for their location, season, and other relevant factors. The dataset contains several important columns including location, season, and production per square kilometer, area, and crop. These features are crucial in predicting the appropriate crop to be cultivated in a particular region based on historical data. The dataset is important for machine learning applications in agriculture, as it provides a reliable and relevant source of data for training and validation of models.

4.3 Performance metrics

To evaluate the performance of the proposed algorithm for predicting the Spending Score, we use three common regression metrics: Mean Squared Error (MSE), Mean Absolute Error (MAE), and R-squared.

i. Mean Squared Error (MSE): MSE measures the average squared difference between the predicted and actual spending scores. MSE can be calculated as in Eq. ( 1 ).

ii. Mean Absolute Error (MAE): MAE measures the average absolute difference between the predicted and actual spending scores. MAE can be calculated as in Eq. ( 2 ).

iii. R-squared: R-squared is a statistical measure representing the proportion of variance in the dependent variable explained by the independent variables. R-squared can be calculated as in Eq. ( 3 ).

where n is the number of samples, y_pred is the predicted Spending Score, and y_actual is the actual Spending Score [ 48 , 49 ].

4.4 Performance evaluation

Figure  5 illustrates a sample of the used dataset, providing a visual representation of the data points utilized in the research. This sample demonstrates the characteristics and distribution of the dataset, showcasing the different features and their corresponding values. By examining this figure, researchers and practitioners can gain insights into the composition and variability of the dataset, which is crucial for understanding the underlying patterns and trends.

figure 5

A sample of the used dataset

Figure  6 presents the correlation matrix, offering a comprehensive depiction of the interrelationships between the various features in the dataset. The correlation matrix enables the identification of potential dependencies, associations, or redundancies among the attributes. This visualization aids in assessing the strength and direction of these relationships, thereby assisting researchers in identifying relevant variables and guiding feature selection or engineering processes. Understanding the correlation matrix is essential for comprehending the impact and significance of individual features on the overall prediction or diagnosis task.

figure 6

Correlation matrix

Figure  7 showcases scatter and density plots, providing a graphical representation of the data distribution and relationships between specific attributes or variables. Scatter plots display the relationship between two variables, illustrating how changes in one variable correspond to changes in another. This visualization aids in identifying patterns, trends, clusters, or outliers in the data. Density plots, on the other hand, depict the probability density of a variable's values, allowing researchers to assess the distribution shape, skewness, or multimodality. These plots provide valuable insights into the underlying data structure, enabling researchers to make informed decisions regarding data preprocessing, model selection, or algorithm customization.

figure 7

Scatter and density plots

The inclusion of these figures in the research paper enhances the clarity and comprehensibility of the findings. They provide visual representations of the dataset's characteristics, interrelationships among variables, and data distribution, offering readers a comprehensive understanding of the research methodology and its implications. Furthermore, these figures facilitate the reproducibility of the research, enabling other researchers to validate the results and potentially build upon the proposed methodology.

Table 2 presents a comprehensive comparison of the results obtained from the proposed XAI-CROP model with those of previous models employed in the research. This table provides a structured and quantitative analysis of various evaluation metrics such as accuracy, precision, recall, F1-score, and any other relevant performance indicators. By comparing the performance of the proposed XAI-CROP model with previous models, researchers and readers gain valuable insights into the improvements achieved and the effectiveness of the proposed approach. This comparative analysis serves as a benchmark for assessing the advancements made in diagnosis prediction for power transformers and highlights the superiority of the XAI-CROP model in terms of predictive accuracy and reliability.

Figure  8 complements the findings presented in Table  2 by visually illustrating the performance comparison between the proposed XAI-CROP model and the previous models. This graphical representation allows for a quick and intuitive understanding of the performance disparities among the different models. It may include bar charts, line graphs, or any other suitable visualization techniques to highlight the variations in accuracy, precision, recall, or other relevant metrics. Figure  8 serves as a visual aid for researchers and readers to grasp the significance of the proposed XAI-CROP model and the improvements it offers over the existing approaches. This figure enhances the communication of research findings and reinforces the credibility and validity of the proposed methodology.

figure 8

Comparative Analysis of XAI-CROP and Preceding Models

The inclusion of Table  2 and Fig.  8 in the research paper empowers readers to make informed comparisons and draw conclusions based on the presented empirical evidence. These figures contribute to the overall clarity and transparency of the research by providing a comprehensive overview of the performance enhancements achieved by the proposed XAI-CROP model. Additionally, they emphasize the practical implications of the research, highlighting the potential impact and benefits it brings to the field of power transformer diagnosis prediction.

Figure  9 displays the R2 convergence curves generated by the lime-based model for each individual model under evaluation. These convergence curves provide valuable insights into the model's performance and its ability to capture the underlying patterns and relationships in the dataset.

figure 9

R2 convergence curve for each model

The R2 convergence curve illustrates the convergence behavior of the lime-based model during the training process. It plots the R2 score, also known as the coefficient of determination, on the y-axis against the number of iterations or epochs on the x-axis. The R2 score represents the proportion of the variance in the target variable that can be explained by the model. A higher R2 score indicates a better fit of the model to the data and a greater ability to make accurate predictions.

By examining the R2 convergence curves for each model, researchers and readers can assess the training dynamics and performance stability of the lime-based model. These curves provide insights into the model's learning progress, convergence speed, and potential for overfitting or underfitting. Patterns such as convergence plateaus, fluctuations, or rapid improvements in the R2 score can be observed and analyzed, aiding in the evaluation and comparison of the models.

The inclusion of Fig.  9 in the research paper reinforces the transparency and reproducibility of the experimentation process. It allows readers to visualize the performance of the lime-based model and gain a deeper understanding of its training dynamics. Additionally, these convergence curves serve as supporting evidence for the efficacy and reliability of the lime-based model in capturing the complex relationships within the dataset, enabling accurate prediction and interpretation.

Overall, Fig.  9 provides a concise and informative summary of the R2 convergence curves generated by the lime-based model, offering crucial insights into the model's training behavior and performance. It strengthens the research findings and facilitates a comprehensive understanding of the lime-based model's effectiveness for the specific task at hand.

5 Results discussion

The performance of the XAI-CROP model was compared to several other machine learning models, including Gradient Boosting (GB), Decision Tree (DT), Random Forest (RF), Gaussian Naïve Bayes (GNB), and Multimodal Naïve Bayes (MNB). The performance of each model was evaluated using three metrics: Mean Squared Error (MSE), Mean Absolute Error (MAE), and R-squared (R2).

The XAI-CROP model outperformed all other models in terms of MSE, with a value of 0.9412, which indicates that the model had the smallest errors in predicting crop yield. The MAE for XAI-CROP was 0.9874, indicating that, on average, the model had an error of less than 1 in predicting crop yield. Finally, the R2 value for XAI-CROP was 0.94152, indicating that the model explains 94.15% of the variability in the data.

Comparatively, the Decision Tree model had the second-best performance, with an MSE of 1.1785, MAE of 1.0002, and R2 of 0.8942. The Random Forest and Gaussian Naïve Bayes models performed similarly, with an MSE of 1.2487 and 1.4123, respectively, and an MAE of 1.0015 and 1.0098, respectively. The Multimodal Naïve Bayes model had the highest R2 value among all models, with a value of 0.77521.

Overall, the XAI-CROP model showed superior performance compared to the other models in predicting crop yield. The LIME technique used in the XAI-CROP model provided interpretable explanations for the model's predictions, enabling researchers to understand how the model makes recommendations. The results of this study demonstrate the effectiveness of XAI-CROP as a tool for crop recommendation systems in agriculture. The main difference between the current study introduced by Ryo [ 50 ] and Doshi et al. [ 51 ] and our proposed model is investigated as follows:

Ryo [ 50 ] discussed the increasing use of artificial intelligence and machine learning in agriculture for prediction purposes. They highlight the issue of black box models, which lack explainability and make it difficult to understand the reasoning behind predictions. The author introduces eXplainable artificial intelligence (XAI) and interpretable machine learning as solutions to this problem. They demonstrate the usefulness of these methods by applying them to a dataset related to the impact of no-tillage management on crop yield.

The analysis reveals that no-tillage can increase maize crop yield under specific conditions. The author emphasizes the importance of answering key questions related to prediction variables, interactions, associations, and underlying reasons. They argue that current practices focus too heavily on model performance measures and overlook these crucial questions, and suggest that XAI and interpretable machine learning can enhance trust and explainability in AI. While Doshi et al. [ 51 ] focused on the importance of agriculture in the Indian economy and the heavy reliance of the population on farming.

The author notes that many farmers rely on traditional farming patterns without considering the impact of present-day weather and soil conditions on crop growth. They propose using Big Data Analytics and Machine Learning to address this issue and present AgroConsultant, an intelligent system designed to assist Indian farmers in making informed decisions about crop selection based on various factors such as sowing season, geographical location, soil characteristics, temperature, and rainfall. The proposed model introduces crop recommendation systems as valuable tools for farmers to optimize yields by providing personalized recommendations based on data such as soil characteristics, historical crop performance, and weather patterns.

The study presents XAI-CROP, an algorithm that leverages eXplainable artificial intelligence principles to offer transparent and interpretable recommendations. The algorithm is compared to other machine learning models, and performance evaluation metrics such as Mean Squared Error, Mean Absolute Error, and R-squared are used. The results highlight the superior performance of XAI-CROP, with low error rates and a high R-squared value indicating its accuracy and interpretability in explaining the data's variability.

For future directions, we can adapt the proposed model to investigate the effect of XAI especially in optimization tasks [ 52 ], Natural language processing (NLP) [ 53 ], and supply chain [ 54 ].

Assumptions:

In the course of our research, we have laid out several foundational assumptions that underpin our study. These assumptions are fundamental in shaping the methodology and outcomes of our research. Firstly, we operate under the assumption that the historical crop yield data at our disposal is both accurate and representative of the agricultural conditions in the regions under study. Additionally, we assume the soil type and weather data collected to be reliable and reflective of the actual conditions on the ground. Furthermore, we assume that the relationships between these factors and crop yield remain relatively stable over time, thus permitting the development of predictive models. These assumptions are pivotal to the feasibility and accuracy of our research.

Beneficiaries and benefits: Our paper stands to confer significant advantages upon a diverse array of stakeholders within the agricultural domain.

Farmers : Foremost among the beneficiaries are individual farmers. By implementing the XAI-CROP system, farmers can access tailored crop recommendations specifically adapted to their geographical location, soil conditions, and historical data. This has the potential to significantly elevate crop yields, minimize resource wastage, and augment overall profitability for individual farmers.

Agricultural managers and decision-makers : Agricultural managers and decision-makers can glean invaluable insights from our research. It equips them with a potent tool to optimize the allocation of resources and streamline decision-making processes. By harnessing the power of XAI-CROP, they can make judicious choices regarding crop cultivation, resource management, and the timing of measures to mitigate adverse weather conditions or diseases. Consequently, this holds the promise of enhancing the productivity and sustainability of agricultural operations on a broader scale.

Researchers and academics : Beyond its immediate applications, our paper contributes substantively to the expanding body of knowledge concerning the application of eXplainable artificial intelligence in agriculture. Researchers and academics can utilize our findings as a foundation for subsequent studies and innovations in crop recommendation systems. This burgeoning research field holds immense potential for further developments, and our work serves as a pivotal stepping stone for future advancements.

Value to managers: Our research yields considerable value for agricultural managers by furnishing data-driven insights and recommendations. In practice, managers can harness the capabilities of XAI-CROP to:

Optimize resource allocation : By selecting the most apt crops based on local conditions, managers can efficiently distribute resources such as water, fertilizers, and labor. This, in turn, translates to cost savings and heightened sustainability.

Enhance decision-making : XAI-CROP provides transparent and interpretable recommendations, significantly diminishing uncertainty in decision-making. Managers can confidently rely on these insights to make informed choices that align with their objectives.

Augment agricultural productivity : The potential for amplified crop yields through our system directly impacts profitability. Managers can anticipate elevated returns on investments and improved food security within their regions.

Suggestions for managers: To unlock the full potential of our research, we proffer several recommendations for agricultural managers:

Regular data updates : Implementing a mechanism for periodic data updates is paramount. This ensures the XAI-CROP model remains precise and up-to-date. The integration of fresh data pertaining to crop performance, weather patterns, and soil conditions is essential for maintaining the system's reliability.

Promotion of a data-driven culture : Cultivating a culture of data-driven decision-making within agricultural management teams is conducive to seamless integration of XAI-CROP into existing practices. This may necessitate training personnel to proficiently utilize the system and fostering collaboration between data scientists and agricultural experts.

Collaboration and knowledge sharing : Collaborative synergy among stakeholders, encompassing farmers, researchers, and governmental bodies, is advisable. Facilitating knowledge exchange and shared experiences can expedite the adoption of our system and its customization to various agricultural regions and challenges.

Interpretation of results: Although you have given a summary of the model's functionality and how it compares to other models, you might want to go into further detail when interpreting the findings. Give an explanation of why XAI-CROP performed better than the other models and an explanation of the factors that led to its higher R2 values, lower MSE, and lower MAE. This can make it easier for the reader to comprehend your model's advantages.

Useful use cases: Describe particular situations in which the XAI-CROP model can be put to use. You could, for example, explain how a farmer's decision-making process could incorporate the model. This could entail a comprehensive explanation of how the model's suggestions are implemented in the real world or a step-by-step manual.

6 Several real-world implications can be done in the real world such as:

Precision Agriculture: The proposed model can be utilized to provide personalized crop recommendations to farmers based on factors such as soil quality, weather conditions, historical data, and specific crop requirements. This can help optimize resource allocation, improve crop yield, and minimize environmental impact by reducing the use of fertilizers and pesticides.

Sustainable Farming Practices: By incorporating explainable AI into crop recommendation systems, the proposed model can assist farmers in adopting sustainable farming practices. It can provide insights into the ecological impact of different crop choices and recommend environmentally friendly strategies, such as crop rotation or intercropping, to enhance soil health and biodiversity preservation.

Climate Change Adaptation: With climate change affecting agricultural productivity and patterns, the proposed model can aid farmers in adapting to changing conditions. By analyzing historical climate data and incorporating predictive models, it can generate recommendations for resilient crop choices that are better suited to withstand extreme weather events or shifting climate patterns.

Small-Scale Farming Support: Small-scale farmers often face unique challenges in terms of limited resources and access to information. The proposed model can offer tailored crop recommendations and provide valuable insights to support decision-making for small-scale farmers, helping them maximize their productivity and profitability.

Decision Support for Agricultural Advisors: Agricultural advisors and consultants can utilize the proposed model to provide expert recommendations to farmers. By incorporating explainable AI, the model can transparently present the underlying reasoning and justifications for specific crop recommendations, enabling advisors to effectively communicate and gain trust from farmers.

7 Conclusion

In this study, we developed XAI-CROP, a crop recommendation system that leverages machine learning and eXplainable artificial intelligence techniques. Through extensive training and evaluation on a dataset encompassing crop cultivation in India, we demonstrated the superior performance of XAI-CROP compared to other machine learning models. Our results showcased its higher accuracy, as indicated by lower Mean Squared Error (MSE), Mean Absolute Error (MAE), and higher R-squared (R2) value.

The key innovation of XAI-CROP lies in its ability to provide interpretable explanations for its recommendations. By incorporating eXplainable artificial intelligence (XAI) techniques such as LIME, XAI-CROP demystifies the decision-making process, making it transparent and understandable for farmers and agricultural stakeholders. This transparency not only enhances the system's usability but also builds trust and confidence among end-users by enabling them to comprehend the rationale behind the recommended crop choices.

Moreover, XAI-CROP holds profound implications for real-world applications, particularly in the context of precision agriculture and data-driven farming. By factoring in geographical location, seasonal variations, and historical data, XAI-CROP empowers users to make informed decisions regarding crop selection. This capability contributes to improved crop yield predictions, optimized resource allocation, and ultimately, enhanced food security in agricultural regions. The physical relevance of XAI-CROP is further highlighted by its compatibility with different geographical locations, scalability to various crops, and potential integration with state-of-the-art techniques. By considering these aspects, our model demonstrates its potential to address diverse agricultural challenges and play a pivotal role in sustainable and efficient crop cultivation worldwide.

In conclusion, XAI-CROP has the potential to revolutionize the agricultural sector by enabling farmers to make data-driven decisions, leading to increased crop yields and improved food security. Our study underscores the importance of utilizing machine learning and explainable AI techniques in the development of practical and effective crop recommendation systems. Future research can focus on enhancing the accuracy and scalability of XAI-CROP, extending its application to other regions and crops, and exploring integration with state-of-the-art techniques to further advance agricultural decision support. By bridging the gap between advanced technology and the physical world of agriculture, XAI-CROP represents a significant step forward in enabling farmers to navigate the complexities of modern farming and make informed choices for sustainable and efficient crop cultivation. It is our hope that this research contributes to the advancement of agricultural practices worldwide, promoting food security and environmental sustainability.

In the future, the proposed algorithm can be used with OCNN [ 55 , 56 , 57 , 58 ] and make use of Resnet [ 59 ]. Attention mechanism can be used as in [ 60 ] and correlation algorithms as in [ 61 ]. YOLO v8 can be used as in [ 62 ]. Additionally, future work can explore the integration of XAI-CROP with state-of-the-art techniques such as those demonstrated in references [ 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 ], offering even more sophisticated capabilities for financial decision support.

Data availability

https://www.kaggle.com/datasets/ananysharma/crop-yield .

Bhadouria R, et al. (2019) Agriculture in the era of climate change: Consequences and effects. In Climate Change and Agricultural Ecosystems, Elsevier, 1–23.

Xu X et al (2019) Design of an integrated climatic assessment indicator (ICAI) for wheat production: a case study in Jiangsu Province, China. Ecol Ind 101:943–953

Article   Google Scholar  

Bali N, Singla A (2021) Deep learning based wheat crop yield prediction model in punjab region of north india. Appl Artif Intell 35(15):1304–1328

Van Klompenburg T, Kassahun A, Catal C (2020) Crop yield prediction using machine learning: A systematic literature review. Comput Electron Agric 177:105709

Alpaydin E (2020) Introduction to machine learning. MIT press.

Tarek Z et al (2023) Soil erosion status prediction using a novel random forest model optimized by random search method. Sustainability 15(9):9. https://doi.org/10.3390/su15097114

Shams MY, Tarek Z, Elshewey AM, Hany M, Darwish A, Hassanien AE (2023) A machine learning-based model for predicting temperature under the effects of climate change. In: The Power of Data: Driving Climate Change with Data Science and Artificial Intelligence Innovations, A. E. Hassanien and A. Darwish, Eds., in Studies in Big Data. Cham: Springer Nature Switzerland, 2023: 61–81. https://doi.org/10.1007/978-3-031-22456-0_4 .

Elshewey AM et al (2023) A novel WD-SARIMAX model for temperature forecasting using daily Delhi climate dataset. Sustainability 15(1):1. https://doi.org/10.3390/su15010757

Porter JR, Xie L, Challinor AJ, Cochrane K, Howden SM, Iqbal MM, Lobell DB, Travasso MI (2014) Food security and food production systems. Part A: Global and Sectoral Aspects. Contribution of Working Group II to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change, 1(1): 485–533 (2014).

Rosenzweig C et al (2013) The agricultural model intercomparison and improvement project (AgMIP): protocols and pilot studies. Agric For Meteorol 170:166–182

Article   ADS   Google Scholar  

Khater HA, Gamel SA (2023) Early diagnosis of respiratory system diseases (RSD) using deep convolutional neural networks. J Ambient Intell Human Comput 14:12273–12283

Lobell DB, Asseng S (2017) Comparing estimates of climate change impacts from process-based and statistical crop models. Environ Res Lett 12(1):015001

Schlenker W, Roberts MJ (2009) Nonlinear temperature effects indicate severe damages to US crop yields under climate change. Proc Natl Acad Sci 106(37):15594–15598

Article   ADS   CAS   PubMed   PubMed Central   Google Scholar  

Roberts MJ, Braun NO, Sinclair TR, Lobell DB, Schlenker W (2017) Comparing and combining process-based crop models and statistical models with some implications for climate change. Environ Res Lett 12(9):095010

Roberts MJ, Schlenker W, Eyer J (2013) Agronomic weather measures in econometric models of crop yield with implications for climate change. Am J Agr Econ 95(2):236–243

Patel K, Patel HB (2023) Multi-criteria agriculture recommendation system using machine learning for crop and fertilizesrs prediction. Curr Agricult Res J 11(1), 2023.

Mittal N, Bhanja A (2023) Implementation and identification of crop based on soil texture using AI. In: 2023 4th International Conference on Electronics and Sustainable Communication Systems (ICESC), IEEE. 1467–1471.

Fenz S, Neubauer T, Heurix J, Friedel JK, Wohlmuth M-L (2023) AI- and data-driven pre-crop values and crop rotation matrices. Eur J Agron 150:126949. https://doi.org/10.1016/j.eja.2023.126949

Arif MS, Mukheimer A, Asif D (2023) Enhancing the early detection of chronic kidney disease: a robust machine learning model. Big Data Cognit Comput 7(3):3. https://doi.org/10.3390/bdcc7030144

Asif D, Bibi M, Arif MS, Mukheimer A (2023) Enhancing heart disease prediction through ensemble learning techniques with hyperparameter optimization. Algorithms 16(6):6. https://doi.org/10.3390/a16060308

Nawaz Y, Arif MS, Shatanawi W, Nazeer A (2021) An explicit fourth-order compact numerical scheme for heat transfer of boundary layer flow. Energies 14(12):12. https://doi.org/10.3390/en14123396

Article   CAS   Google Scholar  

Nawaz Y, Arif MS, Abodayeh K (2022) A third-order two-stage numerical scheme for fractional stokes problems: a comparative computational study. J Comput Nonlinear Dyn 17:101004. https://doi.org/10.1115/1.4054800

Nawaz Y, Arif MS, Abodayeh K (2022) An explicit-implicit numerical scheme for time fractional boundary layer flows. Int J Numer Meth Fluids 94(7):920–940. https://doi.org/10.1002/fld.5078

Article   MathSciNet   Google Scholar  

McEldowney JF (2021) Climate change and the law. In: the impacts of climate change, Elsevier. 503–519.

de Oliveira AC, Marini N, Farias DR (2014) Climate change: New breeding pressures and goals. Encyclopedia Agricult Food Syst 2014:284–293

Williams TO, et al. (2015) Climate smart agriculture in the African context. Unlocking Africa’s Agricultural Potentials for Transformation to Scale , FAO and UNEP , Abdou Diouf International Conference, Dakar, Senegal, pp. 1–26, 2015.

Reddy PS, Amarnath B, Sankari M (2023) Study on machine learning and back propagation for crop recommendation system. In: 2023 International Conference on Sustainable Computing and Data Communication Systems (ICSCDS), IEEE. 1533–1537.

You J, Li X, Low M, Lobell D, Ermon S (2017) Deep gaussian process for crop yield prediction based on remote sensing data. In: Thirty-First AAAI conference on artificial intelligence.

Paudel D et al (2021) Machine learning for large-scale crop yield forecasting. Agric Syst 187:103016

Sun J, Lai Z, Di L, Sun Z, Tao J, Shen Y (2020) Multilevel deep learning network for county-level corn yield estimation in the us corn belt. IEEE J Selected Top Appl Earth Obs

Yoon HS et al (2021) Akkermansia muciniphila secretes a glucagon-like peptide-1-inducing protein that improves glucose homeostasis and ameliorates metabolic disease in mice. Nat Microbiol 6(5):5. https://doi.org/10.1038/s41564-021-00880-5

Khaki S, Wang L (2022) Crop Yield Prediction Using Deep Neural Networks. Front Plant Sci 10, 2019, Accessed: Sep. 27, 2022. Available: https://doi.org/10.3389/fpls.2019.00621

Abbas F, Afzaal H, Farooque AA, Tang S (2020) Crop yield prediction through proximal sensing and machine learning algorithms. Agronomy 10(7):7. https://doi.org/10.3390/agronomy10071046

Talaat FM (2023) Crop yield prediction algorithm (CYPA) in precision agriculture based on IoT techniques and climate changes. Neural Comput Applic. https://doi.org/10.1007/s00521-023-08619-5

Friedman JH (2001) Greedy function approximation: a gradient boosting machine. Ann Stat 29(5):1189–1232

Natekin A, Knoll A (2022) Gradient boosting machines, a tutorial. Front Neurorobotics 7, 2013, Accessed: Sep. 27, 2022. Available: https://doi.org/10.3389/fnbot.2013.00021

Ke G, et al. (2017) LightGBM: A Highly Efficient Gradient Boosting Decision Tree. In: Advances in Neural Information Processing Systems, 2017, 30. Accessed: Sep. 27, 2022. Available: https://proceedings.neurips.cc/paper/2017/hash/6449f44a102fde848669bdd9eb6b76fa-Abstract.html

Rao H et al (2019) Feature selection based on artificial bee colony and gradient boosting decision tree. Appl Soft Comput 74:634–642. https://doi.org/10.1016/j.asoc.2018.10.036

Freund Y, Mason L (1999) The alternating decision tree learning algorithm. In: Icml, 1999, 99, pp. 124–133.

Feng J, Yu Y, Zhou Z-H (2018) Multi-Layered Gradient Boosting Decision Trees. In: Advances in Neural Information Processing Systems, 2018, 31. Accessed: Sep. 27, 2022. Available: https://proceedings.neurips.cc/paper/2018/hash/39027dfad5138c9ca0c474d71db915c3-Abstract.html

Pretorius A, Bierman S, Steel SJ (2016) A meta-analysis of research in random forests for classification. In: 2016 Pattern Recognition Association of South Africa and Robotics and Mechatronics International Conference (PRASA-RobMech), 2016, pp. 1–6.

Sun C, Li X, Guo R (2021) Research on electrical fire risk assessment technology of cultural building based on random forest algorithm. In: 2021 International Conference on Aviation Safety and Information Technology, New York, NY, USA, Dec. 2021, pp. 769–773. https://doi.org/10.1145/3510858.3511382 .

Geenen PL, van der Gaag LC, Loeffen WLA, Elbers ARW (2011) Constructing naive Bayesian classifiers for veterinary medicine: A case study in the clinical diagnosis of classical swine fever. Res Vet Sci 91(1):64–70. https://doi.org/10.1016/j.rvsc.2010.08.006

Article   CAS   PubMed   Google Scholar  

Xu S (2018) Bayesian Naïve Bayes classifiers to text classification. J Inf Sci 44(1):48–59. https://doi.org/10.1177/0165551516677946

Kibriya AM, Frank E, Pfahringer B, Holmes G (2005) Multinomial naive bayes for text categorization revisited. In: AI 2004: Advances in Artificial Intelligence, Berlin, Heidelberg, 2005, pp. 488–499. https://doi.org/10.1007/978-3-540-30549-1_43 .

Jiang L, Wang S, Li C, Zhang L (2016) Structure extended multinomial naive Bayes. Inf Sci 329:346–356. https://doi.org/10.1016/j.ins.2015.09.037

Elshewey A, Shams M, Tarek Z, Megahed M, El-kenawy E-S, El-dosuky M (2023) Weight prediction using the hybrid stacked-LSTM food selection model. CSSE, 46(1): 765–781, 2023, https://doi.org/10.32604/csse.2023.034324 .

Shams MY, Elshewey AM, El-kenawy E-SM, Ibrahim A, Talaat FM, Tarek Z (2023) Water quality prediction using machine learning models based on grid search method. Multimed Tools Appl. https://doi.org/10.1007/s11042-023-16737-4

Article   PubMed   Google Scholar  

Ryo M (2022) Explainable artificial intelligence and interpretable machine learning for agricultural data analysis. Artif Intell Agricult 6:257–265. https://doi.org/10.1016/j.aiia.2022.11.003

Doshi Z, Nadkarni S, Agrawal R, Shah N (2018) AgroConsultant: Intelligent crop recommendation system using machine learning algorithms. In: 2018 Fourth International Conference on Computing Communication Control and Automation (ICCUBEA), Aug. 2018, pp. 1–6. https://doi.org/10.1109/ICCUBEA.2018.8697349 .

Taleizadeh AA, Amjadian A, Hashemi-Petroodi SE, Moon I (2023) Supply chain coordination based on mean-variance risk optimisation: pricing, warranty, and full-refund decisions. Int J Syst Sci: Oper Logist 10(1):2249808. https://doi.org/10.1080/23302674.2023.2249808

Gharaei A, Amjadian A, Shavandi A, Amjadian A (2023) An augmented Lagrangian approach with general constraints to solve nonlinear models of the large-scale reliable inventory systems. J Comb Optim 45(2):78. https://doi.org/10.1007/s10878-023-01002-z

Taleizadeh AA, Varzi AM, Amjadian A, Noori-daryan M, Konstantaras I (2023) How cash-back strategy affect sale rate under refund and customers’ credit. Oper Res Int J 23(1):19. https://doi.org/10.1007/s12351-023-00752-2

Talaat FM (2022) Effective deep Q-networks (EDQN) strategy for resource allocation based on optimized reinforcement learning algorithm. Multimed Tools Appl 81(17). https://doi.org/10.1007/s11042-022-13000-0

Talaat FM (2022) Effective prediction and resource allocation method (EPRAM) in fog computing environment for smart healthcare system. Multimed Tools Appl

Talaat Fatma M, Alshathri Samah, Nasr Aida A (2022) A new reliable system for managing virtualcloud network. Comput Mater Continua 73(3):5863–5885. https://doi.org/10.32604/cmc.2022.026547

El-Rashidy N, ElSayed NE, El-Ghamry A, Talaat FM (2022) Prediction of gestational diabetes based on explainable deep learning and fog computing. Soft Comput 26(21):11435–11450

El-Rashidy N, Ebrahim N, el Ghamry A, Talaat FM (2022) Utilizing fog computing and explainable deep learning techniques for gestational diabetes prediction. Neural Comput Applic. https://doi.org/10.1007/s00521-022-08007-59.FaivdullahL,AzaharF,HtikeZZ,Naing

Hanaa S, Fatma BT (2022) Detection and classification using deep learning and sine-cosine fitnessgrey wolf optimization. Bioengineering 10(1):18. https://doi.org/10.3390/bioengineering10010018

Talaat FM (2023) Real-time facial emotion recognition system among children with autism based on deep learning and IoT. Neural Comput Appl 35(3), https://doi.org/10.1007/s00521-023-08372-9

Talaat FM (2023) Crop yield prediction algorithm (CYPA) in precision agriculture based on IoT techniques and climate changes, April 2023, Neural Comput Appl 35(2), https://doi.org/10.1007/s00521-023-08619-5

Hassan E, El-Rashidy N, Talaat FM (2022) Review: Mask R-CNN Models. May 2022, https://doi.org/10.21608/njccs.2022.280047 .

Siam AI, Gamel SA, Talaat FM (2023) Automatic stress detection in car drivers based on non-invasive physiological signals using machine learning techniques. Neural Comput Applic. https://doi.org/10.1007/s00521-023-08428-w

Talaat FM, Gamel SA (2023) A2M-LEUK: attention-augmented algorithm for blood cancer detection in children, June 2023, Neural Comput Appl. https://doi.org/10.1007/s00521-023-08678-8

Gamel SA, Hassan E, El-Rashidy N et al (2023) Exploring the effects of pandemics on transportation through correlations and deep learning techniques. Multimed Tools Appl. https://doi.org/10.1007/s11042-023-15803-1

Article   PubMed   PubMed Central   Google Scholar  

Talaat FM, ZainEldin H (2023) An improved fire detection approach based on YOLO-v8 for smart cities. Neural Comput Applic. https://doi.org/10.1007/s00521-023-08809-1

Alnaggar M, Siam AI, Handosa M, Medhat T, Rashad MZ (2023) Video-based real-time monitoring for heart rate and respiration rate. Expert Syst Appl 1(225):120135

Alnaggar M, Handosa M, Medhat T, Z Rashad M (2023) Thyroid Disease multi-class classification based on optimized gradient boosting model. Egypt J Artif Intell. 2(1):1–4.

Alnaggar M, Handosa M, Medhat T, Rashad MZ (2023) An IoT-based framework for detecting heart conditions using machine learning. Int J Adv Comput Sci Appl. 14(4).

Alhussan AA, Talaat FM, El-kenawy ES, Abdelhamid AA, Ibrahim A, Khafaga DS, Alnaggar M (2023) Facial expression recognition model depending on optimized support vector machine. Comput Mater Continua. 76(1).

Download references

Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB). The authors received no specific funding for this study.

Author information

Authors and affiliations.

Faculty of Artificial Intelligence, Kafrelsheikh University, Kafrelsheikh, Egypt

Mahmoud Y. Shams & Fatma M. Talaat

Faculty of Engineering, Horus University, Damietta, Egypt

Samah A. Gamel

Faculty of Computer Science and Engineering, New Mansoura University, Gamasa, 35712, Egypt

Fatma M. Talaat

Nile Higher Institute for Engineering and Technology, Mansoura, Egypt

You can also search for this author in PubMed   Google Scholar

Contributions

It is a collaborative effort where Mahmoud, Fatma and Samah worked together. Fatma came up with the idea and wrote the abstract and the proposal, while Samah contributed by making comparisons and made the experiments. Mahmoud wrote the introduction and the related work.

Corresponding author

Correspondence to Fatma M. Talaat .

Ethics declarations

Conflict of interests.

The authors declare that they have no conflicts of interest to report regarding the present study.

Ethical approval

There is no any ethical conflicts.

Additional information

Publisher's note.

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ .

Reprints and permissions

About this article

Shams, M.Y., Gamel, S.A. & Talaat, F.M. Enhancing crop recommendation systems with explainable artificial intelligence: a study on agricultural decision-making. Neural Comput & Applic 36 , 5695–5714 (2024). https://doi.org/10.1007/s00521-023-09391-2

Download citation

Received : 01 May 2023

Accepted : 13 December 2023

Published : 11 January 2024

Issue Date : April 2024

DOI : https://doi.org/10.1007/s00521-023-09391-2

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

  • Crop recommendation systems
  • Machine learning
  • eXplainable artificial intelligence
  • Agriculture
  • Decision support system
  • Find a journal
  • Publish with us
  • Track your research

U.S. flag

An official website of the United States government

The .gov means it’s official. Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

The site is secure. The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

  • Publications
  • Account settings

Preview improvements coming to the PMC website in October 2024. Learn More or Try it out now .

  • Advanced Search
  • Journal List
  • Sensors (Basel)

Logo of sensors

A Cloud Enabled Crop Recommendation Platform for Machine Learning-Driven Precision Farming

Modern agriculture incorporated a portfolio of technologies to meet the current demand for agricultural food production, in terms of both quality and quantity. In this technology-driven farming era, this portfolio of technologies has aided farmers to overcome many of the challenges associated with their farming activities by enabling precise and timely decision making on the basis of data that are observed and subsequently converged. In this regard, Artificial Intelligence (AI) holds a key place, whereby it can assist key stakeholders in making precise decisions regarding the conditions on their farms. Machine Learning (ML), which is a branch of AI, enables systems to learn and improve from their experience without explicitly being programmed, by imitating intelligent behavior in solving tasks in a manner that requires low computational power. For the time being, ML is involved in a variety of aspects of farming, assisting ranchers in making smarter decisions on the basis of the observed data. In this study, we provide an overview of AI-driven precision farming/agriculture with related work and then propose a novel cloud-based ML-powered crop recommendation platform to assist farmers in deciding which crops need to be harvested based on a variety of known parameters. Moreover, in this paper, we compare five predictive ML algorithms—K-Nearest Neighbors (KNN), Decision Tree (DT), Random Forest (RF), Extreme Gradient Boosting (XGBoost) and Support Vector Machine (SVM)—to identify the best-performing ML algorithm on which to build our recommendation platform as a cloud-based service with the intention of offering precision farming solutions that are free and open source, as will lead to the growth and adoption of precision farming solutions in the long run.

1. Introduction

Over the years, by means of human collaboration and with a human touch, traditional agriculture has been transformed into a whole new form that offers greater advantages for the survival of humans. Agriculture, which is considered to be the oldest and primary industry in the world, provides foods and livestock that are needed to feed the world’s population of billions [ 1 ]. Today, other than technology services and crude oil, the Gross Domestic Products (GDPs) of many countries globally depend on the production of agricultural goods, highlighting its necessity as a key industry. Over the years, with the adoption of machinery and technology, most of the manual labor work in agriculture has been replaced to a great extent, thus improving overall quality and efficiency, and encouraging more people to participate in agriculture for their livelihood [ 2 ].

With the growth in urbanization, there will be a dramatic decrease in arable land in the coming years, raising doubts as to whether it will be possible to meet the demand for agricultural food production. On the other hand, according to the most recent studies, it is evident that current agricultural food production needs to be increased by more than 70% by the year 2050 in order to feed the growing global population [ 1 , 2 , 3 ]. Thus, owing to various reasons, such as the decrease in arable land, the requirement of manual labor, and the increasing capital costs, meeting the demand for agricultural food production is increasingly becoming a significant challenge [ 3 ]. This results in a perfect gap for academia, as well as research and development organizations, to find novel solutions that will make it possible to increase the amount of quality harvest while requiring fewer resources, so that these challenges can be overcome in the long run.

To date, with the aim of increasing the quality and the amount of the harvest, various enabling technologies are being used that are powered by Information and Communication Technologies (ICT), including the Internet of Things (IoT), AI, cloud computing, edge computing, fog computing, and 5G communication technologies. The adoption of these technologies has become a booming trend in recent years owing to the benefits they provide to farmers. Furthermore, this fruitful collation of technologies has paved the way for the development of smart agriculture, which describes the use of smarter technologies for agriculture, with the aim of making farming tasks more efficient [ 3 , 4 , 5 ].

In the context of modern agriculture, the lack of proper planning, improper harvesting, irregular irrigation, and unpredictable weather conditions such as floods and droughts are the major concerns preventing farmers from meeting their goals, and these can be ameliorated by using AI to assist farmers in making timely decisions [ 6 , 7 ]. At times, poor outcomes in farming and broken expectations can lead to stress and discomfort for ranchers, and may even lead to suicidal thoughts and eventually loss of lives, as is a reality in most developing countries, including Sri Lanka, India, and Bangladesh [ 7 , 8 , 9 , 10 ]. Nevertheless, it can also lead to social chaos and affect the economy of countries, as was clearly proved by the economic and food crisis that occurred in Sri Lanka in 2022, with the decision taken to ban the import of all chemical fertilizers into the country as a government policy [ 10 , 11 ]. On the whole, agricultural food production in recent years has faced immense challenges, owing to supply chain and logistics issues arising during the COVID-19 global pandemic, a deadly virus outbreak that is still prevalent [ 11 ]. Moreover, the current conflict in the Black Sea region and the supply chain disruptions in the agricultural commodities market have also increased the risk of food insecurity [ 10 , 11 ].

According to the United Nations Food and Agriculture Organization (FAO), nearly 33% of all food produced for human consumption is wasted every year owing to various factors [ 9 , 10 , 11 ]. These losses can mainly be attributed to the choice of unsuitable crops, lack of proper planning, changes in climate, weeds, pests, changes in government policy, etc. Nevertheless, in recent years, there have been drastic climatic changes occurring owing to global warming [ 12 , 13 , 14 , 15 ]. Among all these factors, the selection of unsuitable crops has a great effect on the expectations of farmers, as it burns through the entirety of the resources (such as the cost of seeds, fertilizers, etc.) [ 6 , 7 , 8 , 9 , 10 , 15 , 16 , 17 , 18 ] that have been spent on harvesting, leading to even more disastrous consequences. Hence, it is indeed essential to prioritize which crop should be harvested before carrying out land preparation, which can be highly challenging to guess on the basis solely of the knowledge gained through traditional farming practices. With the advancement of technology, as mentioned above, novel technologies have been applied in farming to improve the overall health condition of crops and aid farmers throughout the farming process, from land preparation to the preparation of the harvest for market. This portfolio of technologies is commonly known as precision farming or precision agriculture, and is mainly governed by three key technologies: IoT, AI, and agriculture robotics. AI, being a remarkable and revolutionizing technology that mimics typical human thinking processes, aids in making timely and precise decisions that will result in better yield and a higher-quality harvest. Thus, motivated by the manner in which ML, which is a key founding technology of AI, can reshape traditional farming, in this study we aim to present a cloud-hosted ML-powered crop recommendation platform for farmers, so that farmers can have a better sense before commencement of harvesting regarding which crop to harvest, thereby reducing the overall harvest wastage and resulting in better yield and a higher-quality harvest in a timely manner. Thus, motivated by the manner in which ML can assist in precision farming and how it can assist in making timely decisions regarding farming, below we present the key motivational factors behind carrying out the research.

  • Even though there have been recent studies on various ML applications in smart agriculture, these have only provided a theoretical overview of the application and only focus on experimental evaluations, not implementations.
  • Most of the work carried out has been focused on and limited to publications, and have not addressed the aspect of how these technologies can be offered to farmers for free and as open-source solutions.

1.1. Contributions of the Study

As outlined above, with to the aim of aiding farmers in making precise and timely decisions with respect to their farming process, the key contributions of this study can be enumerated as follows.

  • After the introduction, a quick overview of precision farming is offered, as it is the primary focus of this study.
  • The role of AI in precision farming is addressed, with a special emphasis on the application of ML.
  • To validate our work and differentiate it from the work of others, we provide a brief comparison of recent related work, highlighting the key contributions and the main application areas related to precision farming.
  • We designed a cloud-based ML-driven crop recommendation platform and provide a discussion on how to offer such technologies to farmers for free, with the intention of encouraging researchers who are engaged in this area towards the invention of novel solutions for revolutionizing agriculture.

1.2. Outline of the Study

The paper is organized as follows. Following the introduction, we provide a brief overview of precision farming in Section 2 , while also providing a brief overview of AI in precision farming, mainly highlighting the ML aspects of AI. Further, in Section 3 , a brief literature review is provided, highlighting the latest research in the field, and differentiating our work from theirs. Next, in Section 4 , our research methodology is highlighted on the basis of an experimental evaluation of our research, followed by a discussion. Finally, the paper concludes with the conclusions derived through our research work.

2. Precision Farming

Precision farming, otherwise known as the precision agriculture, is the next big revolution in agriculture. It aims to bring real-time information on farms and livestock to the farmers as required, allowing them to make precise and timely decisions, resulting in higher harvest and less wastage of scarce resources [ 12 , 19 , 20 , 21 , 22 ]. Predominantly, precision farming is a collation of three main technologies: Artificial Intelligence (AI), agriculture robotics, and Internet of Things (IoTs) [ 13 ], as depicted in Figure 1 .

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g001.jpg

Three foundation technologies of precision farming.

In precision farming, a variety of IoT sensors are used to gather various environmental parameters related to farms and livestock, including soil fertilizer level, water requirements, soil nutrient level, and health of animals [ 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10 , 12 , 13 , 14 , 15 ]. The data collected by the various sensors at the end nodes are sent to the cloud or remote servers through wired or wireless communication media. At the cloud or server side, various data analytic methods are utilized to infer useful meanings and interpretations from the data, which are then used to make precise and accurate decisions. Accordingly, the system may order agriculture robots to execute certain tasks in a timely manner. For better understanding, Figure 2 depicts the overall steps in precision farming from the gathering of data from IoT sensors and execution of tasks by agricultural robots, based on understandings of the analyzed data. Additionally, these data, when analyzed and refined, may also offer valuable insights to farmers, including with regard to the condition of crops, plant and animal diseases, and weather conditions, as well as forecasting future conditions and predicting the crop yield, with the aim of maximizing the overall efficiency of the farm [ 22 , 23 , 24 , 25 , 26 ].

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g002.jpg

Overall steps in precision farming.

At the present time, precision farming solutions are heavily used to increase productivity and maximize crop yield, and the entire crop cycle can benefit from the accurate deployment of precision farming applications. According to Libelium [ 9 ], which designs key IoT technological solutions for smart agriculture and other related IoT markets, the total market value for precision agriculture solutions has now almost doubled with respect to that in 2016. There are a lot of startup companies that have been established in recent years that offer various commercial precision agricultural services, both hardware and software solutions, especially in India, Australia, and New Zealand [ 11 ]. However, despite the availability of many precision agricultural solutions, most farmers are still reluctant to move forward with the technology, which hinders the digitalization progress of farming for the betterment of humankind.

In precision farming, autonomous robots may perform a variety of tasks, and it is evident that they can replace human laborers when performing most agricultural tasks, such as land preparation, seeding, planting, and harvesting [ 9 ]. The autonomous devices commonly used in precision agriculture can be mainly divided into two categories: fully autonomous devices and semi-autonomous devices, such as Unmanned Aerial vehicles (UAVs) and agriculture robots used for detecting plant diseases and weeds [ 10 , 11 , 12 , 13 ]. UAVs hold a key place in precision agriculture, as they can gather a vast amount of data on a large-scale farm within a very short period of time, making them an ideal solution for large-scale framing. Moreover, aerial images taken from satellites can also be used in precision farming for identifying suitable land, plant diseases, predicting weather conditions, and remote sensing applications [ 4 , 5 , 10 , 11 , 12 , 13 ].

Apart from crop condition monitoring and management, livestock management is another important aspect of precision farming, where it can help in monitoring overall health condition and real-time location of animals [ 13 ], and improve the productivity, welfare, and reproductive behavior of animals throughout their life cycle. Various intelligent sensors implanted internally and externally on animals and real-time cameras can assist in making smarter decisions regarding underlying conditions and act accordingly in a timely fashion [ 26 , 27 , 28 ].

Despite the slow adoption of precision farming solutions, the wide use of precision farming solutions around the world can be mainly attributed to the power of AI, which is backed by both ML and Deep Learning (DL), the two main pillars of AI. Nonetheless, the availability of high-speed Internet, low-budget sensors, and efficient computational devices has aided the wide dissemination of precision farming solutions at the present time [ 28 , 29 , 30 , 31 , 32 ]. Having provided a brief overview of precision farming, in the next subsection, we will briefly discuss the use of AI in precision farming.

AI in Precision Farming

AI is a major technology of the 21st century, and it is used by most industries, including in agriculture, surveillance, military, smart city, and healthcare, to make precise decisions on the basis of the underlying conditions and to act accordingly. In general, AI provides computational intelligence such that the machines can learn, understand, and respond according to varying situations. AI can be further categorized into ML, DL, natural language processing (NLP), computer vision, fuzzy logic, expert systems, and swarm intelligence (SI), which are key subfields of AI [ 12 ]. As mentioned above, AI is currently applied in a variety of aspects of human life, and even with smart mobile devices like Apple, Samsung, and Microsoft, serving as human, friendly virtual assistants [ 4 , 5 , 6 , 7 , 8 ]. At the current time, according to the latest studies, it is evident that, at the current growth rate of technology, AI is going to change the world more than anything in the history of mankind [ 9 , 12 , 32 , 33 , 34 , 35 ]. Being the key pillar of precision farming, AI is currently involved in many precision farming applications, allowing farmers to act in a timely manner. On a typical farm, IoT sensors and UAVs produce millions of data points in a single day, accumulating a large volume of data, also referred to as big data [ 8 , 9 ]. In most cases, this big data will be transferred into the cloud, and AI will be used to infer the meaning of this data [ 35 , 36 , 37 , 38 , 39 ].

In precision farming, the data captured from IoT sensors deployed in the field are used to predict crop yield, other related natural weather conditions, and the occurrence of disastrous situations with the help of AI, which will eventually help in meeting the current demand for agricultural food production in the long run [ 40 , 41 , 42 ]. Hence, it is deemed essential to embrace these precision farming solutions as much as possible. As the main focus of this paper is to present how ML is involved in precision farming by developing an ML-powered crop recommendation platform that can be used by farmers to determine what crop should be harvested on the basis of the known environmental parameters, next, we intend to focus more on the application sides of ML in precision farming, in order to give a better holistic view of ML. In general, ML allows learning without needing to be explicitly programmed, and mimics human problem-solving ability. ML acts as an important decision-making tool in precision farming, and can be applied throughout the entire growing and harvesting cycle. On the whole, this begins with crop prediction, soil preparation and selection, water requirement prediction, crop yield prediction, and finally agricultural robots pick up the harvest by determining the ripeness and the quality of fruits through computer vision techniques [ 9 , 39 , 40 , 41 , 42 ].

Normally the process of ML can be broken down into three parts: data loading and preprocessing, model building, and generalization, as shown in Figure 3 . The data are loaded in the form of a raw dataset; secondly, the data are preprocessed; and thirdly, the predictive ML model is built using suitable ML algorithms. Finally, the generalization involves predicting the output for inputs on which the ML algorithms have never trained before.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g003.jpg

A typical machine learning process.

As of now, owing to the availability of powerful innovative algorithms, big data, and fast Internet connections, ML applications have been widely used for solving a variety of problems that humans often fail or need a lot of time to solve. On the other hand, DL, which is a branch of ML, trained on much larger datasets or with higher volumes of big data, can also be used to make intelligent decisions, the same as ML. ML can be further broken down into three categories: supervised learning, unsupervised learning, and reinforcement learning [ 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10 , 12 , 13 ], as depicted in Figure 4 .

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g004.jpg

Categories of ML algorithms with key examples.

Supervised learning is the process of learning or training with well-known labeled data to classify outcomes or predict outcomes accurately [ 1 , 2 , 3 , 4 ]. As input, data is fed into the model, and the weights are adjusted until the model is properly fitted, which happens during the cross-validation phase. Further, the supervised learning algorithms used for predicting the categorical values are known as classification algorithms, and the algorithms that are used for predicting the numerical value are known as regression algorithms. Unsupervised learning algorithms work with unlabeled data, in contrast to supervised learning algorithms, and they are capable of discovering unknown objects by precisely grouping similar objects [ 1 , 2 , 3 , 4 ]. On the other hand, the implementation of unsupervised algorithms is quite difficult compared to supervised learning algorithms, as the main objective of unsupervised algorithms is to extract hidden knowledge from the training data. When it comes to reinforcement learning, it is a method based on rewarding desired behaviors and punishing undesired behaviors. A reinforcement learning agent, in general, is capable of perceiving and interpreting its surroundings, taking actions, and learning through trial and error [ 3 , 4 , 5 , 6 , 7 ]. For better understanding commonly used ML algorithms are further described in Table 1 , in the following.

Machine learning algorithms.

Supervised learning, unsupervised learning, and reinforcement learning techniques are, taken together, used heavily in various industries, such as in agriculture, in combination with IoT for data analytics. Furthermore, in precision farming, wireless sensor networks (WSN) and IoT are widely combined with ML to quantify and understand the big data generated from the sensing devices. As per the literature, ML applications in precision farming can be mainly apportioned to four key categories—crop management, water management, soil management, and livestock management—which are discussed in detail in the following, and we intend to provide examples for these applications in the next section, summarizing the latest research work.

  • Applications for crop management

It is imperative that farmers have the information necessary to properly forecast crop output and determine the means by which yield might be increased and how the condition of crops can be managed throughout the entire crop cycle [ 13 ]. Temperature, humidity, rainfall pattern, type and quality of the soil, fertilizer, and harvesting pattern are the key driving factors that have a great impact on predicting the condition of the crops and provide insight on how the harvest can be increased [ 1 , 2 , 3 , 4 , 10 , 13 ]. Nonetheless, during the whole crop life cycle, farmers must pay close attention to the health of crops, since pathogenic fungi, germs, and bacteria get their energy from the crops they grow on, which ultimately affects the harvest as they feed on crops [ 11 , 12 , 13 ]. Thus, farmers stand to lose a lot more money if the problem is not caught and fixed quickly [ 10 ]. When illnesses are eliminated and crops are restored to their former functioning, farmers bear the bulk of the costs in the form of pesticides, which in return have a negative consequence on the surrounding environment [ 10 , 11 , 12 , 13 ]. In this regard, with the support offered by IoT and enabling technologies, ML applications provide precise insights on what crop should be planted according to the environmental conditions [ 1 , 2 , 3 , 4 , 5 ], predicting crop diseases and pests [ 10 , 11 , 12 , 13 ], predicting the yield and forecasting the forthcoming environmental conditions [ 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 13 , 14 , 15 , 16 , 17 ].

  • Applications for water management

To compensate for rainfall shortages, fresh water is required for irrigation and the delivery of nutrients for plant development, and agricultural activities around the world use over 70% of the available freshwater [ 2 , 3 , 4 , 5 , 6 ]. This emphasizes the significance of the responsible management of water via the use of precision irrigation methods underpinned by ML. Farmers are now dealing with a variety of irrigation issues such as over-irrigation, under-irrigation, water depletion, floods, and so on; and with the adoption of ML and IoT, higher crop yield can still be achieved, while simultaneously reducing the amount of water that is used up in the cultivation process (e.g., adopting ML-powered drip irrigation methods and sprinkler irrigation methods [ 11 , 12 , 13 ]).

  • Applications for soil management

The forecast of soil attributes is the first and most significant step in the process of farming, which often influences the selection of seeds and crops, preparation of land and fertilizer, and manure selection [ 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 ]. As soil characteristics are directly related to the geographical and climatic conditions of the area being utilized, this is an important factor to consider before starting farming on the field. The major components of predicting soil characteristics using ML include forecasting the nutrients in the soil [ 1 , 2 , 3 , 4 ], the humidity of the soil surface [ 11 , 12 , 13 ], and the climatic conditions that will occur throughout the crop’s lifetime [ 11 , 12 , 13 ].

  • Applications for livestock management

Livestock production refers to the cultivation of domesticated animals (such as pigs, cattle, sheep, and so on) for the purpose of providing commodities for human consumption such as eggs, milk, and meat. Livestock production and management are dependent on farming aspects of the animals, such as their health, food, nutrition, and behavior [ 12 , 13 ], so that the livestock output can be maximized, and farmers can gain a higher profit. In the current context, IoT, ML, and blockchain technologies are being widely explored to improve livestock sustainability and for analysis of their chewing habits, eating patterns, and movement patterns (e.g., standing, moving, drinking, and feeding habits) [ 11 , 12 , 13 ], which indicate the amount of stress the animal is experiencing and, in turn, help in predicting the vulnerability of livestock to disease, weight gain, and mortality. According to [ 12 ], ML-powered weight forecasting systems are used for the evaluation before slaughter. According to the findings of [ 5 , 6 , 7 , 8 , 9 , 11 , 12 , 13 ], with the support of precision arming solutions powered by ML farmers have the ability to modify their livestock’s diet and living conditions in order to facilitate better growth for the animals in terms of their health, behavior, and weight gain, which will, in turn, improve the economic efficiency of livestock.

3. Literature Review on Precision Farming Applications

In recent years, with the adoption of ML in precision farming, several research works have already been conducted in various aspects of agriculture. Thus, in order to give a better overview and to differentiate our work from theirs, in the following we summarize the latest research in a tabular form, in Table 2 .

Summary of the most recent studies with their contributions.

4. Materials and Methods

The first step involved in the design of our crop recommendation platform includes preparing our crop recommendation dataset, which we took from Kaggle [ 22 ], and was built by augmenting actual rainfall, climate, and fertilizer data available for India [ 22 ], and secondly preprocessing the data for further analysis. Altogether, the dataset we employed contained 2200 records and eight features. In the third step, we performed an exploratory data analysis using the underlying data in the dataset, in order to understand the nature of our data. The fourth step involved extracting the best features in order to build our ML models using different classification ML algorithms including KNN, DT, RF, XGBoost, and SVM algorithms. Once the model-building step was completed in the next step, we evaluated the performance metrics of the models, and once the evaluation was complete, we arranged the deployment of our best-performing model as a cloud-based web app on the Google Cloud platform, making up our crop recommendation platform. To achieve a better understanding, all steps involved in the design of our crop recommendation platform, along with the high-level architecture of our proposed platform, are illustrated in Figure 5 .

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g005.jpg

Steps involved in the design of the crop recommendation platform.

4.1. Dataset Preparation and Feature Selection

The features in the chosen crop recommendation dataset [ 22 , 23 ] included soil nitrogen level (N), soil phosphorus level (P), soil potassium level (K), air temperature, air humidity, soil pH level, rainfall, and crop label, which is a categorical variable (i.e., the type of crop). The dataset contained 2200 records, and Table 3 depicts the statistical summary of our dataset for better understanding. Further, in order to understand the true nature of our data before dealing with predictive data analysis, we performed an exploratory data analysis. In this regard, in order to understand what kind of data we were dealing with (range and distribution), we analyzed the distribution of features as depicted in Figure 6 . Next, we plotted a correlation heatmap depicting the correlation matrix representing the correlation between different features on the dataset, as shown in Figure 7 . According to the correlation heatmap, it is evident that there is only a strong positive correlation (correlation score close to 1) between a few of the features, with most of the features having a very weak correlation or being negatively correlated (correlation score close to 0 or less than 0).

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g006.jpg

Distribution of features in the dataset.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g007.jpg

Correlation matrix showcasing correlation between different features of the dataset.

Statistical summary of our dataset.

According to the features of the dataset, the soil N, P, and K values hold a key place, from a biological perspective, as they act as the key macro-nutrients that plants feed on while they are growing. In general, the main contributions of these macro-nutrients can be categorized as follows:

  • N—Nitrogen is mostly responsible for the growth of leaves on the plant.
  • P—Phosphorus is mostly responsible for development of flowers, fruits, and growth of roots.
  • K—Potassium is responsible for being able to perform the overall functions of the plant correctly.

These macro-nutrients can be supplied through fertilizer, and depending on the N, P, and K concentrations of the fertilizer, it will be better suited to different ranges of crops. Furthermore, crops require large amounts of N, P, and K to grow and thrive, and plants that are well fed are healthier and more productive. However, if farmers do not use fertilizer, the soil may not provide enough nutrients for maximum growth [ 4 ]. Fertilizer adds nutrients that the soil lacks, and understanding the NPK ratios that crops require would thus assist farmers in achieving optimal plant development and yield by managing fertilization. Hence, in this regard, and as depicted in Figure 8 , we evaluated the N, P, and K requirements for different types of crops in our dataset. Based on Figure 8 , it is evident that apples and grapes require a high potassium level compared to all other crops, based on our data in the dataset.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g008.jpg

Comparison of N, P, K requirements of different crops.

The rest of the features in the dataset include air temperature, air humidity, soil pH, and rainfall. These features also aid in determining which crop to harvest, as soil pH influences the availability of essential nutrients, bacteria, and toxic elements in the soil; rainfall is essential for the survival of plants; the water requirements of plants may depend on the type of the plants; and air temperature is essential for photosynthesis—when the temperature rises, photosynthesis may also increase, and air humidity is essential for plant transpiration, for example, when the humidity level is high or there is a lack of air circulation, a plant cannot make water evaporate or draw nutrients from the soil, which would eventually result in rotting of the plant. Taken together, all of these features play a vital role in determining which crop to harvest. Further, when it comes to the crop type that can be predicted based on the other available features, there were several categories of crops, including rice, apple, chickpea, black gram, muskmelon, banana, pomegranate, kidney beans, grapes, cotton, coffee, coconut, mango, papaya, orange, lentil, pigeon peas, and moth beans.

4.2. Predictive Data Analysis

The Python programming language wasused to create our predictive ML models, and in the dataset preparation stage, once the dataset was acquired, first, we imported the necessary libraries from Python to perform the data preprocessing, such as NumPy for performing mathematical operations, Matplotlib for plotting the charts, Pandas for dataset manipulation and the Scikit-learn library for predictive data analysis. Secondly, as the dataset may contain some missing data that would hinder the performance of our ML models, we searched for the missing values, which were handled successfully.

In the feature selection phase, we manually selected all features from the dataset for N, P, K, air temperature, air humidity, soil pH level, and rainfall with the aim of choosing the best crop to plant as all the features contribute equally to the growth of the crop in a biological perspective. Then, to perform predictive data analysis, we chose N, P, K air temperature, air humidity, soil pH level, and rainfall as our independent variables and crop label as our dependent variable, which was the name of the crop type.

After choosing the dependent and independent variables, we split out the main dataset into training and testing data sets, with a ratio of 70:30, to perform the predictive analysis. Afterwards, five machine learning models (KNN, DT, RF, XGBoost and SVM) were adopted to perform the predictive data analysis. Before training the models, we finalized the data pre-processing stage, and during the splitting of the dataset into training and test datasets, we randomly split the dataset with a training and test set ratio of 70 to 30 (70:30), as described above. After splitting the dataset, we trained our ML models and we evaluated Accuracy, Precision, Recall, and K-Fold cross-validation scores, which are based on four types True Positive (TP), True Negative (TN), False Positive (FN), and False Negative (FN) for all of the underlying ML algorithms we adopted. In terms of TP, TP is defined as cases that are predicted to be positive, and which are actually positive. TN is defined as cases that are predicted to be negative, and which are actually negative, while FP is when the cases are predicted to be positive, but are actually negative. FN is when the cases are predicted to be negative, and they are actually positive. For the five ML algorithms, we adopted the following four key performance metrics for use to determine the classification performance, including the K-Fold cross-validation score. Equation (1) is used to determine the accuracy, which is based on the accurate and total samples. In general, an accuracy score suggests if a model is being trained properly and how it will perform in general, but it does not provide comprehensive information about how it will be applied to the underlying ML problem.

Equation (2) measures the precision score, which measures the differential rate of the classifier and presents the proportion of accurately predicted positive observations to all expected positive observations.

Equation (3) measures the recall score which measures the ratio of TP over the total number of true. In simple terms it measures the accurately predicted positive observations for all observations in the actual class.

F1 score is an overall accuracy metric that combines precision and recall. A solid F1 score suggests that there are few FPs and few FNs, and that you are on the right track of recognizing serious threats while avoiding false alarms.

Upon the successful completion of model training, the adopted underlying ML models predicted what type of crop would be more suitable, and in the next subsection, we highlight the predicting performance of ML algorithms we adopted for the design of our recommendation platform using the best predicting algorithm.

4.3. Experimental Results

In this section, the experimental results are discussed regarding the predicting performance of ML algorithms we adopted. Table 4 demonstrates the accuracy, precision, recall, F1, and 10-fold cross-validation scores we obtained for better comparison. Further, Figure 9 demonstrates the accuracy comparison of all ML models we have adopted.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g009.jpg

Accuracy comparison of ML algorithms.

Accuracy, precision, recall, F1 and 10-fold cross validation scores.

According to the results we obtained, it is evident that all ML algorithms adopted have varying predicting capabilities in terms of predicting which crop is more suitable according to the input data. In terms of accuracy, it is evident that RF performs the best, with a score of 97.18%, as opposed to other predicting algorithms KNN (96.36%), DT (86.64%), SVM (87.38%), and XGBoost (95.62%). According to the precision score, which measures the proportion of positively predicted labels that are actually correct, both RF and KNN perform equally well, with a score of 97%, whereas DT performs the worst, with a score of 82%. In terms of Recall score, which is about our ML model’s ability to correctly predict the positives out of actual positives, yet again, RF performs with a score of 97%, whereas DT and SVM both perform the worst, with a score of 87%. Next, as per the F1 score, RF is highest, with a rate of 97%, whereas KNN is 96%, DT is 83%, XGBoost is 96% and SVM is 87%.

To evaluate the generalizing capacity of the adopted ML models, we used K-Fold cross-validation with the intention of estimating the overall performance of the models with K = 10. In terms of K-Fold scores, it is clear that RF possesses the highest score of 97.40%. On the other hand, DT performs poorly, with a low score of 83%. Even though accuracy is not a good score to measure the performance of an underlying ML model, based on the other performance metrics such as precision, recall, F1 score, and 10-fold cross-validation scores it is evident that RF, outperforms other ML models while predicting which crop to harvest.

4.4. Implementation of the Crop Recommendation Platform

Based on the performance evaluation criteria outlined above, it is evident that RF performs best among the ML algorithms adopted, in terms of predicting which crop to harvest. Hence, for our crop recommendation platform, we intend to use RF to predict the most suitable crop, according to the input parameters submitted by the user, which include N, P, K, air temperature, air humidity, soil pH level and rainfall. Once the best-performing model has been selected, the model is separately serialized/saved for the design of the crop recommendation platform using the Python pickle module as the next step. All steps involved in the design and deployment of the crop recommendation platform are depicted in Figure 10 .

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g010.jpg

Steps involved in design and deployment of the crop recommendation platform.

For the design of the platform, we used Flask, which is a Python-based microframework used for developing websites that allows developers to design Restful Application Programming Interfaces (APIs) using the Python language in a convenient way. In this regard, in order to design the web pages that the users are interacting with, we designed the necessary web pages using HTML (Hypertext Markup Language), in an interactive way using the JavaScript and CSS programming languages. Once the design was ready, we deployed our system using the local Flask web server and tested its functionality, and whether it was accepting user input with appropriate validations and giving the output as expected. Once the local testing ha been performed, we deployed our local tested web app to Google Cloud App Engine as a Platform as a Service (PAAS), in which the computing resources can be upgraded at any time, guaranteeing almost 99.9% uptime and 24 × 7 convenient access from any device. As per the demonstration purpose, we used their free tier service, which is free of charge within specified monthly usage limits. Figure 11 and Figure 12 showcase the cloud-hosted fully functional recommendation platform.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g011.jpg

Cloud-hosted crop recommendation platform.

An external file that holds a picture, illustration, etc.
Object name is sensors-22-06299-g012.jpg

Cloud-hosted crop recommendation platform user documentation.

4.5. Discussion

On the basis of the performance metrics we obtained during the training phase of the ML models, it is evident that RF outperforms all of the other ML models we trained in terms of all of the performance criteria we analyzed. Even though the dataset we used for training contained 2200 entries, which is quite a small amount for training, in terms of other performance criteria we evaluated (recall, precision etc.) apart from accuracy, it is evident that RF performs better than the other models. Thus, we used RF as the underlying ML model in our crop recommendation platform. Once the user has submitted the necessary parameters, the system validates whether there are null values and whether the values are within the validation ranges, before submitting the user’s input to the system for further processing, where the system itself processes the inputs and predicts the most suitable crop for planting on the basis of the input parameters, which is highly beneficial for farmers before harvesting, allowing them to make precise decisions about what to harvest, thus resulting in a higher return on investment with less loss. While designing our recommendation platform, we assumed that farmers would obtain this information by submitting parameters using the meteorological data already available and from the widely available existing IoT precision farming solutions, some of which are highlighted in Table 4 . As the platform we designed is a cloud-based platform, anyone can access the platform from anywhere at any time with any device, making the service highly convenient. On the other hand, because the dataset we picked to develop our platform was based on data from India, more data may be required from different geographic locations around the world in order to offer our solution to everyone in the world, as crop growth varies from that in India depending on the climate and the environment in other countries. However, as the platform evolves, we may be able to aggregate more data from various regions around the world, in which case users/farmers will be able to first select their geographic location and enter the necessary parameters, after which the system will predict which crop would be most suitable. As our study demonstrates the involvement of ML in the design of precision farming solutions, this could pave the way for future researchers to design real-time prediction systems in combination with IoT.

In general, with agriculture being such an important element of every economy, it is critical to guarantee that even the smallest investment made in the agriculture sector are taken care of, and choosing the best crop for harvesting is a key investment that guarantees a higher-quality harvest. As a result, it is critical to verify that the correct crop has been chosen for the land and according to the environmental context. With our proposed solution, after applying some feature enhancements, such as with the incorporation of an inbuilt IoT hardware set-up for accurate data gathering according to the specific geographic location, and relying on more accurate data collected from different locations and in combination with more parameters with the aid of IoT, it will be possible to offer this technology to everyone, which would be highly beneficial for every farmer that is keen to move into technology-driven precision farming. For the time being, there are a lot of organizations that are engaged in designing precision farming solutions, and a lot of startup companies are also being established that aim to expand the precision farming market and reach out to more farmers. As we have reviewed, most of the available solutions are offered on a subscription basis and are offered as cloud-based solutions; however, trial versions are also available with limited features, with farmers needing to pay more to access additional features. On the other hand, even though there are a lot of commercial solutions are there, there are a few free and open-source (when software is open source, it grants users the right to use, study, change and distribute the software and its source code to anyone and for any purpose) precision farming solutions available that many peoples are not aware of, each having different benefits. Thus, it is indeed essential that farmers are well aware of these solutions, as they will allow them to use technology for free rather than investing higher upfront costs for everything. For better understanding, the Table 5 showcases several of the best available free and open-source precision farming solutions [ 43 , 44 , 45 , 46 , 47 , 48 ].

Free and open-source precision farming solutions.

From our perspective, as we have discussed, free and open-source precision farming solutions are still growing in the market, and there is still a long way to go, as they have to compete with commercial solutions. On the other hand, most of the free and open-source solutions are aided by a community of developers and other relevant stakeholders and farmers, thus empowering the growth of open-source solutions, as any development issues and doubts related to the integration of technology can be tackled with ease [ 49 , 50 , 51 ] with the help of these communities. Therefore, the main work in our study, we proposed and designed our crop recommendations platform while bearing this in mind.

According to the summarized table in Section 3 , it can be noted that many researchers have presented AI-powered solutions that are applicable to various aspects of agriculture, such as for crop management and soil management. On the other hand, only a few research works have been carried out in this area in recent years, and most of these works have been focused on providing theoretical overviews and practical implementations. None of these studies addressed or discussed how to offer these technologies for free and open source, or how to reach out to a larger audience (farmers) with greater visibility. In contrast, in our study, we demonstrated solutions to these problems, with a step-by-step explanation, and provided an overview of how to offer these technologies for free by giving examples.

5. Conclusions

Agriculture, being the primary industry in the world, aids in feeding billions of people all globally. With the involvement of technology, traditional agriculture has transformed such that there is less manual labor, while still achieving better yield and a higher-quality harvest. IoT-enabled smart sensors, underlying communication technologies, actuators, satesatellite, UAV solutions, along with AI, are some of the major technological innovations leveraged in the field of agriculture to reach the next level. This collation of fruitful technologies makes it possible to gather real-time data and make timely and precise decisions without the need for human support, making farming more efficient. AI is the key founding technology of precision agriculture, and resolves complex solutions without human intervention, assisting farmers in making precise decisions regarding the underlying condition of their farms in a timely manner. Currently, most countries are moving towards the adoption of precision farming practices, to take advantage of their immense benefits, such as access to remote monitoring even during the time of the COVID-19 global pandemic, reduced manual labor, and higher harvest. Thus, in this study, we demonstrated a novel cloud-enabled ML-driven crop recommendation platform with a detailed explanation of its step-by-step implementation. Nevertheless, we further provided a brief overview of precision farming, as well as the use of AI in precision farming, summarizing the most recent work carried out in this subject area.

At the present time, the precision farming market is expanding at a rapid rate, and a variety of applications are already on the market. Most of the solutions on the market are commercialized, although there is still free and open-source software available, which many are not aware of. In this regard, we also provided a brief overview of the kinds of solutions already available, and what services they offer. As the key objective of this study is to demonstrate the integration of ML into precision farming, as well as other enabling technologies, like the cloud, we showcased all of the steps involved in designing a cloud-hosted ML-powered crop recommendation platform that can help farmers in deciding which crops to harvest according to the local environmental conditions. Furthermore, we note that these technologies can be freely offered to everyone, and they should be backed by support from communities who are like-minded groups of people interested in these technologies and who have a mind to make this world a better place for everyone. By doing so, we believe that these precision farming solutions and services can reach many farmers, even farmers located in rural and remote areas, ultimately resulting in the growth of precision farming, and allowing most of the challenges associated with feeding billions of people all around the world to be overcome.

Funding Statement

This research was funded by Universiti Brunei Darussalam.

Author Contributions

Conceptualization, N.N.T.; Data curation, N.N.T.; Formal analysis, N.N.T.; Funding acquisition, H.Y.; Investigation, N.N.T.; Methodology, N.N.T.; Project administration, H.Y.; Resources, N.N.T.; Software, N.N.T.; Supervision, H.Y., M.S.A.B. and P.E.A.; Validation, N.N.T.; Visualization, N.N.T.; Writing—original draft, N.N.T.; Writing—review and editing, H.Y., M.S.A.B. and P.E.A. All authors have read and agreed to the published version of the manuscript.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Conflicts of interest.

The authors declare no conflict of interest.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Academia.edu no longer supports Internet Explorer.

To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to  upgrade your browser .

Enter the email address you signed up with and we'll email you a reset link.

  • We're Hiring!
  • Help Center

paper cover thumbnail

Crop Prediction and Fertilizer Recommendation Using Machine Learning

Profile image of IJERA Journal

India's global economy is critically dependent on agriculture, which also accounts for a sizeable portion of GDP. As the world's population grows, it is essential to maintain food security, which is made possible and managed by the country's agricultural output.Planning for agriculture is important for agro-based nations' economic development and food security. Agriculture continues to face a number of issues. The choice of the crop to be farmed presents many challenges for farmers. Farmers face a credit collapse if they grow the incorrect crop. In order to feed the world's population, agriculture's productivity must undergo massive expansion. The most widely recognised technological innovation is machine learning; however, there are several more. By investigating the composition and other traits of the soil, it is envisioned that the right crop and fertiliser would be forecast as part of this proposed work. Crop prediction assists farmers in selecting the ideal crop for planting in order to enhance output and profitability.

Related Papers

International Journal of Scientific Research in Computer Science, Engineering and Information Technology

International Journal of Scientific Research in Computer Science, Engineering and Information Technology IJSRCSEIT

India being an agricultural country, its economy predominantly depends on agriculture yield growth and allied agro industry products. In India, agriculture is largely influenced by rainwater which is highly unpredictable. Agriculture growth also depends on diverse soil parameters, namely Nitrogen, Phosphorus, Potassium, Crop rotation, Soil moisture, and Surface temperature and also on weather aspects which include temperature, rainfall, etc. India now is rapidly progressing towards technical development. Thus, technology will prove to be beneficial to agriculture which will increase crop productivity resulting in better yields to the farmer. The proposed project provides a solution for Smart Agriculture by monitoring the agricultural field which can assist the farmers in increasing productivity to a great extent. Weather forecast data obtained from IMD (Indian Metrological Department) such as temperature and rainfall and soil parameters repository gives insight into which crops are suitable to be cultivated in a particular area.

crop recommendation research paper

IRJET Journal , Unnathi Suvarna

The use of the internet has brought vast numbers of users online through different platforms. Unlike the old days, the internet is not just limited to email surfing, there's so much on the internet or let's say everything is on the internet. The Internet has solutions for almost everything, from mental health to technical issues. In this agriculture, fields cannot be untouched. The 21 st Century has been the age of technology where technology has been used everywhere. So, for optimum results in each field, we use various methods which can minimize the loss and give us maximum benefits. The application of Machine learning in Crop type prediction for modern world farming is very much essential. Also, suggesting the type of fertilizer and amount can increase the usability of the application. Crop yield prediction and fertilizer suggesting application use machine learning algorithms to predict the crops yield based on various aspects: like the amount of rainfall and other different real-world parameters.

IRJET Journal

The farming industry is extremely important in India for economic growth and employment creation. Agriculture employs around 48% of the inhabitants in India. It gives locals the opportunity to work and contribute to the growth of a country like India on a large scale, as well as strengthens the economy, as agriculture is the backbone of India's developing economy. Farmers have always followed historical agricultural techniques and traditions. But, a single farmer cannot be expected to consider all of the numerous elements that influence crop development. A single erroneous judgment made by the farmer might have unfavorable consequences. The project's goal is to help farmers determine the quality of their soil and analyze its many properties, as well as to propose crops and fertilizers based on the results of a machine-learning approach. The system utilizes multiple Categorization strategies to increase the performance of the Crop Recommendations System and Fertilizer Recommendation System. As a result, the strategy assists novice farmers in gathering information. This project takes soil and ph data as inputs and creates a website to anticipate which crops are most suited to the soil and which fertilizers may be used to treat illnesses discovered in plants.

International Journal of Engineering Applied Sciences and Technology

Devdatta Bondre

International Journal of Advances in Engineering Architecture Science and Technology (IJAEAST)

Background: India's agricultural expertise as the world's largest producer covers a range of areas, including dry fruits, textile raw materials, pulses, farmed fish, and more. However, there is a challenge in farming methods, where farmers often rely heavily on fertilizers and grow the same crop season after season without much understanding. Objectives: To overcome this challenge, a forward-thinking initiative has incorporated machine learning to revolutionize farming practices. Methods: This transformative step involves a customized recommendation system that utilizes machine learning algorithms to assist farmers in selecting crops and applying precise amounts of fertilizer based on their specific soil and weather conditions. Statistical Analysis: The ultimate goal is to move from single-crop cultivation and enable farmers to diversify their offerings throughout different seasons. The benefits are numerous. Applications: This approach holds the promise of increased profitability through diversified crops and optimized fertilizer usage, while also promoting sustainability. By encouraging crop rotation and the informed use of fertilizers, this initiative aims to reduce soil pollution and contribute to the long-term well-being of ecosystems. Improvements: Essentially, deploying this machine learning-based model represents a leap in modernizing and optimizing the Indian sector while empowering farmers toward a more resilient, sustainable, and economically viable future.

International Journal for Research in Applied Science & Engineering Technology (IJRASET)

IJRASET Publication

Agriculture is the majority source of income for many people not just in the Indian subcontinent but around the world and hence forms the backbone of the economy. Present-day difficulties like unpredictability in weather conditions, water scarcity, and volatility due to demand-supply fluctuations create the need for the farmer to be equipped with modern day techniques. More specifically, topics like less yield of crops due to unpredictable climate, faulty irrigation resources, and soil fertility level depletions need to be communicated. Hence there is a requirement to modify the abundant agriculture data into modern day technologies and make them conveniently accessible to farmers. A technique that can be implemented in crop yield prediction is Machine learning. Numerous machine learning techniques like regression, clustering, classification and prediction can be employed in crop yield forecasting. Algorithms like Naïve Bayes, support vector machines, decision trees, linear and logistic regression, and artificial neural networks can be employed in the prediction. The wide array of available algorithms poses a selection dilemma with reference to the selected crop. The purpose of this study is to investigate how different machine learning algorithms may be used to forecast agricultural production and present an approach in the context of big data computing for crop yield prediction and fertilizer recommendation using machine learning techniques.

IJERA Journal

India is an Agriculture based economy whose most of the GDP comes from farming. The motivation of this project comes from the increasing suicide rates in farmers which may be due to low harvest in crops. Climate and other environmental changes have become a major threat in the agriculture field. Machine learning is an essential approach for achieving practical and effective solutions for this problem Predicting yield of the crop from historical available data like weather, soil, rainfall parameters and historic crop yield. We achieved this using the machine learning algorithm. We did a comparative study of various machine learning algorithms, i.e., ANN, K Nearest Neighbor, Random Forest, SVM and Linear Regression and chose Random Forest Algorithm which gave an accuracy of 95%. In this project a mobile application has been developed which predicts the crop yield in general and also for a particular crop. Along with that, it also suggests the user if it is the right time to use the fertilizer or not

Ramesh Medar

Agriculture is the backbone of India. It also plays an important role in the Indian economy by providing a major percentage of domestic cultivation to ensure the security of food. Now a days all the farmers facing difficulties on cultivation due to natural calamities and wrong selection of crops. Machine learning is one of the best possible ways to solve the farmers problem at an extend. However there occurs a problem regarding which algorithm suits the best as well as which is the best way to do so. This paper is a survey on the strategies as well as the algorithms used with pros and cons. With existing system issues and libraries used. Keywords—Machine Learning, prediction, Classification Technique.

Farhana Kausar

marjorie cabag

RELATED PAPERS

THE 2ND SCIENCE AND MATHEMATICS INTERNATIONAL CONFERENCE (SMIC 2020): Transforming Research and Education of Science and Mathematics in the Digital Age

A'ang Subiyakto

Suresh Maran

Steven Sweetman

Psicologia Argumento

Gislei Polli

Transactions of the Japan Society of Mechanical Engineers Series B

Ilhwan Park

SIAM J. Comput.

Hernán González-Aguilar

Josephine Kerscher

Journal of Legal, Ethical and Regulatory Issues

Venkata Sai Srinivasa Rao Muramalla

Gloria Ochoa

Frontiers in Plant Science

awani singh

Victor de Farias

Sustainability

Sisira Kumara Naradda Gamage

Proceedings of the National Academy of Sciences

David Baker

PaKMas: Jurnal Pengabdian Kepada Masyarakat

Wendy Tanod

Civil Engineering Journal

Khalid Mohammed Breesem

Journal of Applied Research in Water and Wastewater

Journal of Applied Research In Water and Wastewater , Mojtaba Saneie

International Journal of Biomedical Imaging

lamia muhammed

Pendidikan Toleransi Beragama Dalam Penguatan Integrasi Nasional Anggoro Arij Salsabila 204

anggoro arij123

Aliyu haruna musa

Brazilian Journal of Development

Laura Campos Modesto

Alireza Saboori

Avery Review

Bryan E Norwood

Mathematical Modelling of Engineering Problems

Ahmed Hassan

  •   We're Hiring!
  •   Help Center
  • Find new research papers in:
  • Health Sciences
  • Earth Sciences
  • Cognitive Science
  • Mathematics
  • Computer Science
  • Academia ©2024

AI-Farm: A crop recommendation system

Ieee account.

  • Change Username/Password
  • Update Address

Purchase Details

  • Payment Options
  • Order History
  • View Purchased Documents

Profile Information

  • Communications Preferences
  • Profession and Education
  • Technical Interests
  • US & Canada: +1 800 678 4333
  • Worldwide: +1 732 981 0060
  • Contact & Support
  • About IEEE Xplore
  • Accessibility
  • Terms of Use
  • Nondiscrimination Policy
  • Privacy & Opting Out of Cookies

A not-for-profit organization, IEEE is the world's largest technical professional organization dedicated to advancing technology for the benefit of humanity. © Copyright 2024 IEEE - All rights reserved. Use of this web site signifies your agreement to the terms and conditions.

COMMENTS

  1. Enhancing crop recommendation systems with explainable ...

    Crop Recommendation Systems are invaluable tools for farmers, assisting them in making informed decisions about crop selection to optimize yields. These sy. ... The inclusion of Table 2 and Fig. 8 in the research paper empowers readers to make informed comparisons and draw conclusions based on the presented empirical evidence. These figures ...

  2. (PDF) Crop Recommendation System

    Lakshmi.N, Priya.M, Sahana Shetty, and Manjunath C. R, Crop Recommendation System for Precision Agriculture, vol. 6 Reading, IND: International Journal for Research ...

  3. (PDF) Crop Recommendation System

    This proposed system developed a crop. recommendation system for smart f arming. In this research. paper reviewed various machine learning algorithms like. CHAID, KNN, K -means, Decisio n Tree ...

  4. Soil Analysis and Crop Recommendation using Machine Learning

    This paper proposes a crop recommendation system that uses a Convolutional Neural Network (CNN) and a Random Forest Model to predict the optimal crop to be grown by analyzing various parameters including the region, soil type, yield, selling price, etc. The CNN architecture gave an accuracy of 95.21 %, and the Random Forest Algorithm had an ...

  5. Improvement of Crop Production Using Recommender System ...

    In hybrid recommendation model 90% of crop recommendation are truly relevant and 93%of relevant crops were recommended from the list Table 3. Recommendation model comparison Technique Precision (%) Recall (%) Collaborative filtering 80 73 Case-based reasoning 88 79 Hybrid recommendation 90 93 5. ... " The research described in this paper are ...

  6. (PDF) Crop recommendation system for precision agriculture

    The paper proposes a feasible and user-friendly crop recommendation system for the farmers. The proposed system provides connectivity to the farmers via a mobile application.

  7. IOT-BASED professional crop recommendation system using a weight-based

    By adding agro-climatic crop data including temperature, relative humidity, soil type, soil pH, and crop period, a classification model is produced to assist farmers in making decisions, and a recommendation system is built based on three variables: crop, crop type, and districts [5, 6]. A unique method called "Prediction of the Districts ...

  8. Design and implementation of a crop recommendation system using nature

    Chapter 4 - Design and implementation of a crop recommendation system using nature-inspired intelligence for Rajasthan, India. Author links open overlay panel Lavika Goel a ... OpenAI (Li & Schreiber, 2006) and Jimmy Ba (Noble & Daniel, 1987) from the University of Toronto in their 2015 ICLR paper (poster) titled "Adam: A Method for ...

  9. Crop Recommendation System using Machine Learning Algorithms

    India is a predominantly agricultural country, with agriculture playing animportant part in the Indian economy and people's lives. Crops are recommended based on soil, weather, humidity, rainfall, and other variables to increase agricultural output. It benefits not just farmers, but also the country and helps to keep food costs down.This paper presents the utilisation of machine learning ...

  10. Machine Learning Approaches for Crop Recommendation

    This research contributes to the development of a model that assists farmers by providing crop-related information or crop recommendations based on various attributes such as crop details, soil composition, weather conditions that crop can grow in, temperature, soil PH, and rainfall. This research employs machine learning algorithms such as ...

  11. Crop-Yield Prediction and Crop Recommendation System

    In this paper we are using various techniques like XGB Regressor, Ridge Regression and LGBM Classifier. ... Crop Yield Prediction, Crop Prediction, Recommendation System, Precision Agriculture, XGBoost Regressor ... and Crop Recommendation System (April 8, 2022). Proceedings of the 7th International Conference on Innovations and Research in ...

  12. A Cloud Enabled Crop Recommendation Platform for Machine Learning

    1.2. Outline of the Study. The paper is organized as follows. Following the introduction, we provide a brief overview of precision farming in Section 2, while also providing a brief overview of AI in precision farming, mainly highlighting the ML aspects of AI.Further, in Section 3, a brief literature review is provided, highlighting the latest research in the field, and differentiating our ...

  13. Crop Recommendation in Precision Agriculture using Supervised Learning

    It will be used to research data of soil characteristics, soil types, crop yield data collection and suggests the farmers the right crop based on their site-specific parameters. This problem is solved by proposing a crop recommendation system through an ensemble model with majority of voting technique using Data collection, K- Nearest ...

  14. (PDF) Crop prediction using machine learning

    This paper contributes to the following aspects- (a) Crop production prediction utilizing a range of. Machine Learning approaches and a comparison of e rror rate and accuracy for certain regions ...

  15. Crop Recommender System Using Machine Learning Approach

    This paper proposes a viable and user-friendly yield prediction system for the farmers. The proposed system provides connectivity to farmers via a mobile application. ... To predict the crop yield, selected Machine Learning algorithms such as Support Vector Machine (SVM), Artificial Neural Network (ANN), Random Forest (RF), Multivariate Linear ...

  16. (PDF) Survey on Crop Recommendation System

    This paper presents a survey of various Machine Learning and Deep Learning. algorithms used in building Crop Recommendation Systems, offering insights into which algorithms are most. effective for ...

  17. (PDF) Crop Prediction and Fertilizer Recommendation Using Machine

    The system utilizes multiple Categorization strategies to increase the performance of the Crop Recommendations System and Fertilizer Recommendation System. ... This paper is a survey on the strategies as well as the algorithms used with pros and cons. ... March 2023, pp. 28-32 RESEARCH ARTICLE OPEN ACCESS Crop Prediction and Fertilizer ...

  18. Crop recommendation system for precision agriculture

    Precision agriculture is a modern farming technique that uses research data of soil characteristics, soil types, crop yield data collection and suggests the farmers the right crop based on their site-specific parameters. ... In this paper, this problem is solved by proposing a recommendation system through an ensemble model with majority voting ...

  19. (PDF) Soil Analysis and Crop Prediction

    aSoil analysis is an important process to determine the available plant nutrients in the soil. Plants absorb the major nutrients through soil. In addition to soil, there are various major factors ...

  20. AI-Farm: A crop recommendation system

    Contributing to about 17% of India's total GDP and providing employment to more than 60% of net population, crop cultivation or agriculture plays an essential role in Indian economy. With the advent of technologies like vertical farming etc, evolution in this domain has been pretty evident. But, even when farming has such a massive command over the country, Indian farmers still rely on ...