Crop Recommendation System Using Machine Learning

DOI : 10.17577/NCRTCA-PID-443

Download Full-Text PDF Cite this Publication

Text Only Version

Crop Recommendation System Using Machine Learning

Crop Recommendation System Using machine Learning


1PG Scholar, Department of Computer Applications, Madanapalle Institute of Technology

&science, Madanapalle(AP),

2Assistant Profrssor, Department of Computer Applications,Madapalle Institute Of Technology & Science, Madapalle(AP),


The most significant sources of revenue in India are without a doubt agriculture and its affiliated businesses. The country's GDP is measured in gross domestic product (GDP) is also strongly influenced by the agricultural sector. The country is blessed with the rural area's size. In any scenario, the yield per acre of the crop shockingly stubby by contrast international standards. This might be among the factors contributing to the increased rate of self-destruction among ranchers in India's outlying regions. This study offers a useful and simple yield expectation paradigm for ranchers. The suggested framework offers a network to ranchers via an adaptable application. The client's location can be determined with the use of GPS. The customer supplies the geography and information on soil type. The selection of the appropriate the client's choice of the most favourable harvest list or a projection of the crop's harvest yield .They are so many machine learning algorithms but Random Forest model fared better than the others in terms of output, with an accuracy of 95%. The structure also shows that ideal compost application window to increase production. Similar to fertilisers are crop

recommender, random forest, machine learning, and crop yield prediction systems, support vector machines (SVM), neighbours (KNN), multivariate linear regression(MLR),K-nearest and Artificial neural networks (ANN)


    Agriculture has a long history in India. In terms of ranch yield overall, India is currently ranked second [15]. Nearly half of the workforce was employed by agribusiness- related industries in 2009, included the fishing industry, which made up 16.6% of GDP, and ranger services.

    Agribusiness is no longer making as much of a financial contribution to India's GDP [1]. The financial success of farming is significantly influenced by harvest yield. Numerous variables, including as meteorological, topographical, environmental, and monetary considerations, have an impact on the harvest yield [6]. Ranchers find it challenging to choose When and which crops should be planted because of variable business sector costs [7]. India's incidence of self-destruction has ranged in recent years According to Wikipedia [15],

    between 1.4 and 1.8 percent per 100,000 people Given how vulnerable the climate is, ranchers are unclear about which harvest to grow or when the best time to begin. The use of various Composts are also in doubt because to changes in the climate and important resources such as water, air, and soil. Harvest yield progress is currently decreasing steadily [2]. Giving ranchers a fantastic, user-friendly recommender system will address the issue.

    The horticultural industry is very concerned about expectations for harvest production [3]. Each rancher strives Projecting the yield will help growers estimate crop production and if it satisfies their expectations [4]. based on past harvesting experiences. The main factors affecting horticulture yields are the weather, annoyances, and job planning. Accurate information on crop history is needed to make judgements regarding horticulture risk [5]. In this work, we provide a model that deals with these problems. The innovative component of the recommended framework is that it teaches ranchers to enhance harvest yield while simultaneously proposing the optimal harvesting for the designated area. The suggested method enables crop selection based on economic and environmental considerations, as well as the advantage of boosting harvest production, which will help to fulfil the country's rising food demand [8].By focusing on elements Precipitation, temperature, area, season, and soil type, among other factors, are proposed model projects harvest yield. The framework helps determine the best time of year to use composts. According to the current framework, agricultural production is either equipment-based and consequently overly expensive to maintain, or crop output is not genuinely available. The proposed architecture provides an adaptable web-based

    application that, by forecasting harvest output, accurately anticipates the most advantageous harvest. The client's location can be determined with the use of GPS. The customer provides a development area and soil composition as sources of information and using the demand as a basis, the model forecasts the crop yield for a specific harvest The programme also suggests when to apply manures and what yield will be the most fruitful.

    Below is a list of the paper's primary commitments: 1. Using a variety of machine learning calculations, the prediction of harvest production for certain districts with a correlation between accuracy and error rate.

    2. A versatile, simple-to-use programmed that suggests the highest 3. A GPS-based location indicator to locate a specific spot and receive the precipitation assessment. 4. A circumstance in which a recommender can advise on the ideal timing to apply manures.

    The remaining portions of the essay are organized as follows: In the second section, horticulture and yield forecasting analysts examine the foundation they have built. Segment III offers suggestions for which crop to cultivate together with the proposed model for yield expectation. The algorithm also recommends the ideal time of day to employ composts. Section IV examines the outcomes, and Section V closes the report.


    Some of the techniques employed to support agribusiness include fostering By predicting the proper yields and using whatever ML draws close, mechanical prowess and advances may make the horticulture sector more competent and efficient for ranchers. The paper goes over a number of calculations, including ANN, Fuzzy Network, and several information mining

    procedures, along with their advantages. Combining all of these continuous datasets would be the next test [9]. In the well-known Madhya Pradesh, one of the primary inquiries established a dedicated area to assess the impact of climatic limits on agricultural production.The regions were picked depending on the geographic reach of the harvest. These algorithms were used to choose the top five places in the region with the greatest yield. The evaluated yields were chosen in accordance with successful harvests in the selected area. The harvests chosen included maize, soybean, wheat, and rice, with yields spread out over a 20-year period. The precision of the designed model increased Regarding the harvested crops, the accuracy ranged from 76% to 90%, with an average of 82 percent. Another significant study [11] anticipates harvest production, evaluates soil quality, and makes a fair compost prescription. Area and Ph esteem of the client were used as inputs. in this model. The weather and temperature for the present location were predicted using an API. The strategy takes the results of computations using both supervised and unsupervised machine learning. Described in [12] is a classifier that forecasts harvest production using an eager system. It has been demonstrated that a property-based decision tree classifier yields superior outcomes. The effects of many model should be coordinated, according to a proposed group model, as this has been regularly proved to be more effective than using only one model. Several choice tree models are used to predict the harvest yield in an arbitrary bush gathering order. The mean and standard deviation are computed from the information, which is divided into two groups with proportions of 67 percent and 33 percent for preparation and testing, respectively. In order to obtain the most accurate findings, this strategy also groups harvests that are comparable.

    There has been a lot of study done and ML computations employed in the farming industry. Increasing ranch output while providing the product to the final customer at the largest possible price and quality is the most tough challenge in agriculture. Additionally, it has been noted that almost half of home output is wasted and never gets to the final consumer. The outlined approach offers suggestions for cutting down on ranch product waste.

    In one of the most recent publications, a model is put up in which bunches are formed using KNN calculations to forecast the harvest yield. It has been demonstrated that KNN bunching is significantly more successful than SVM or relapse [13].

    [17] calculates the agricultural harvest during the given year using cutting-edge Regression techniques include Lasso, Enet, and Kernel Ridge computations. Accuracy of the calculations was increased by the stacking relapse.

    To retrieve the Maharashtra state datasets, the authentic datasets are sorted using the Pandas profiling tool. The multi-facet perceptron brain organization was used to develop the harvest yield expectation model, and the predilection, weight, and Adam analyser were altered to boost accuracy. The recommended model takes use of an ANN with a three-layer brain architecture to anticipate crop production [18]. Through the use of a controlled learning technique, crop yield forecasting is carried out. outlined the connection between a number of real aspects and the framework's capacity to boost harvest production [19]. Temperature and precipitation are two factors that have an impact on the harvest yield. Long Short-Term Memory (LSTM) and Intermittent Neural Network (RNN) calculations were used to increase the precision of these time series

    data [20]. SARIMA (Seasonal Auto Regressive Integrated Moving Average), The Auto Regressive moving average (ARMA) and ARMAX(ARMA with exogenous components) techniques are employed for predicting temperature and precipitation by utilizing reliable data .The harvest yield expectation framework, employing fuzzy logic, utilizes the most efficient model for this purpose includes evapotranspiration and cloud cover as exogenous components.


    Even with a variety of recent agreements, there are still unresolved problems with creating an application for crop suggestions that is simple to use. By advocating the suggested method provides a user-friendly application that takes into consideration factors in an effort to get rid of these restrictions. that directly influence development, such as temperature, soil type, precipitation, and others. The main goal is to broaden the variety of crops that may be farmed all year. The recommended approach would help ranchers lessen the difficulties they face when selecting a crop and increase yield, thereby lowering rates of self- destruction [16]. The suggested model predicts the harvest yield based on the informative indices for the specified site. By boosting yields and streamlining the relevant assets, machine learning-assisted farming will lead to further advancements in agriculture. It's crucial to include knowledge from prior years while evaluating present implementation. Information is gathered from a number of reliable sources, such as,, and State-specific informational indexes have been created for Maharashtra

    and Karnataka. The properties of the data include state, location, year, The dirt sort is also present in other datasets that include state and region details. The main informational collection is divided up and this dirt sort segment is convergent into it.

    The primary informative collections for the site now also include temperature and typical precipitation, which were gathered from a different dataset. The indexes for information have been cleaned and are now usable. Average features take the place of invalid attributes. All of our credits are translated into names before processing the calculations. The single hot encoding strategy is employed in informative indexes to control values for categories.

    Figure 1 displays the framework architecture of the proposed model. Forecasting and manure management are the two aspects of this adaptable programmed. Access to several administrations is made possible by the versatile application. The landowner is required to enroll with the application during the enlistment procedure. After completing the sign-up process, the rancher can use the portable application administrators. The expectation module selects credits from the informative indexes appropriate for the given crop in order to predict the harvest yield. Additionally, the rancher with the highest return crops is suggested by the foresee module. The module for composting demonstrates to the rancher the best ways to apply the manure.


    Fig. 1 Structure of the System

    Figure 2 displays the flowchart for the proposed scheme. It covers every step of the process, including registration and all of the functions the mobile application provides.

    Fig. 2 Flow Chart

    You must register before using the application's services. The programmed uses GPS to locate the region's topography and identify the rancher's district. during enrollment. After successfully logging in, the user may access two administrations. The most helpful tool is the yield expectation, whether it be while employing a harvest recommender framework for the chosen harvest. The assistance that followed is concrete proof that the compost is appropriate in use. In the expectation administration, the customer must enter the

    projected yield, soil type, and development region. The yield of the crop is projected by the forecasting system. FIG. 3 displays the recruitment process so that you can take advantage of the application procedures.

    Fig. 3 Registration Process

    The yield recommender system can be used by the rancher if he is doubtful about the harvest that should be prepared for this year. Just the region and soil type should be provided by the rancher in the harvest recommender framework. The system records harvests and anticipated yields. Ranchers will find it simpler to select a crop to produce as a result. The placement of the compost needs to be well thought out. The rancher would lose his If the rain comes too soon, all of your hard work and money will be wasted. The rancher will get instructions on how and when to utilise the manure from the recommended compost utilisation administration. Using the Open Weather API, the model forecasts a flood for the region during the following 14 days.

    The block diagram for the experimental implementation is presented in Figure 4. The recommended model's graphical user interface is constructed with the Ionic Framework, which also makes use of JavaScript, Angular JS, and React JS. The framework is built and implemented as progressive online apps from a single code

    base for a number of platforms, including iOS, Android, the workplace, and the web [14]. Firebase hosts the datasets and other resources necessary for the framework.

    Artificial intelligence is used for crop yield forecasts. Machine learning is used to find the representatives and links. The model was created utilising trustworthy databases of instructive data, and the result was handled using previous knowledge.

    Various widely used to anticipate yield, AI computations are used. The Random Forest relapse had occurred in one of the chosen computations.

    the highest degree of accuracy. Irregular Forest cultivates a wide range of desired trees before fusing them to produce the most dependable and consistent expectations.

    Block diagram for experimental implementation, Figure 4.


The outcomes of several computations for Maharashtra and Karnataka are discussed in this section. Examples of calculation boundaries include crop type, year, season, soil type, region, and location.. The accuracy of the anticipated harvest production is considered for each of the chosen computations. With an accuracy of 95%, the arbitrary forest computation proved to be excellent for the given informative index. Crop production is predicted using ML techniques including ANN, SVM, MLR, RF, and KNN are examples of machine learning techniques. Table 1 displays the categorical outcomes of the exactness correlation of many ML calculations. Figure 5 provides a graphic representation of the results.

TABLE I : precision vs Algorithm

Fig. 5: precision vs Algorithm

Crop Yield, Figure 6. Forecast for a Particular Crop

Option1: The client is excited to learn about the likely production and is well aware of the projected harvest for this season. A client will choose a harvest and associated factors like area and kind of soil. The internal indicator block predicts a crop's harvest yield. crop chosen by the client using the Random Forest Algorithm. Figure 6 provides an illustration of one potential result.

Fig. 7: The Crop Recommender system Option2:

Rancher uses recommender framework when client is undecided of which yield to plan for this year. the suggestions for different yields depending on the soil type and location are shown in Figure 7. Customers can choose from a list of suggestions that has already been made. Choosing the best time for a rancher to apply manures is another important consideration. The framework suggests the ideal timing to employ the

composts based on a 14-day forecast, as shown in Figure 8.

Fertilizer Timing in Figure 8


    This research analyzed the shortcomings of the existing frameworks and their practical application to produce expectation. The ranchers are then guided through a proposed framework called a practical yield expectation framework, which links home stale with a network using a portable application. Customers can use a variety of elements in the adaptable application to choose a crop. Using the built-in indicator system, ranchers may forecast the output of a specific harvest. A client may research potential harvests and make better judgements thanks to the integrated

    recommender architecture. On Maharashtra and Karnataka datasets, several AI To guarantee correctness, algorithms including SVM, ANN, MLR, Random Forest, and KNN were carried out and tested. The accuracy of the different calculations is contrasted. The findings show that, with a precision of 95%, Random Forest Regression is the most precise calculation commonly performed on the datasets given. The suggested model also considered compost application planning and offered a suitable time frame. Future research will concentrate on automating the cycles for periodically renewing datasets to produce accurate predictions. The provision of the proper compost for the harvest and placement is another step that needs to be finished. It is important to finish this thorough investigation of the many manures that are available and how they affect the soil and ecosystem. It is necessary to review the easily available measurable data.


The creator has expressed gratitude to all creators who have taken part in leading the trial and investigation for the intended study work. We appreciate for supplying the CMR Institute of Technology the tools we needed and choosing the locations that served as the basis for our inquiry.


[1] Umamaheswari S,Sreeram S,Karitika N,Prasanth DJ, Bolt: Blockchain-based IOT for Agriculture, 11th International Confreence on Advamced Computing(ICoAC),2019 Dec 18 (pp.324- 327).IEEE.

[2] Jain A. Analysis of growth and instability in the area, production,yield ,and

price of rice in india, Journal of Social Change and Development,2018;2:46-66

[3] Manjula E,Djodiltachoumy S, A model for prediction of Crop Yield InternationalJournal of Computational Intelligence and Informatics,2017 Mar;6(4):2349-6363.

[4] Sagar BM, Cauvery NK., Agriculture Data Analytics in Crop Yield Estimation: A Critical Review ,Indonesian Journal of Electrical Engineering and Computer Science,2018 Dec;12(3):1087-93

[5] Wolfert S,Ge L,Verdouw C,Bogaardt MJ,Big data in smart farming a review agricultural Systems, 2017 may 1;153:69-80

[6] Jones JW, Antle JM,Basso B,Boote KJ,Conant RT,Foster I,Godfray HC,Herrero M,Howitt Re,Janssen S,Keating BA, Toward a new generation of agricultural system data, models and knowledge products:State of agricultural systems science. Agricultural Systems, 2017 ju; 1;155:269-8

[7] Johnson LK, Bloom JD, Dunning RD, Guntur CC, Boyette MD, Creamer NG, Farmer harvest decisions and vegetable loss in primary production. Agricultural Systems,2019 Nov 1;176:102672

[8] Kumar R, Singh MP, Kumar P, JP, Crop Selection Method to maximize crop yield rate using a machine learning technique

,International conference on smart technologies and management for computing, communication, controls, energy, and materials (ICSTM), 2015 may 6 (pp.138-145).IEEE.

[9] SriramRakshith.K Dr.Deepak.G,Rajesh M,Sudharshan K S, Vasanth S, Harish Kumar N, A Survey on Crop Prediction using Machine Learning Approach, In International Journal for Research in Applied Science & Engineering Technology (IJRASET),April 2019,pp(32313234)

[10] Veenadhari S, Misra B, Singh CD, Machine learning approach for forecasting crop yield based on climatic parameters, In 2014 International Conference on Computer Communication and Informatics, 2014 Jan 3 (pp.1-5).IEEE

[11] Ghadge R, Kulkarni J, More P , Nene S, Priya RL, prediction of crop yield using Machine learning,Int.

Res.J.Eng.Technol.(IRJET) 2018 Feb; 5.

[12] Priya P, Muthaiah U, Balamurugan M, predicting yield of the crop using machine learning algorithm, International Journal of Engineering Sciences &Research Technology ,2018 Apr;(!):1-7.

[13] S. Pavani, Augusta SophyBeulet p., Heuristic Prediction of Crop Yield Using Machine Learning Technique, International Journal of Engineering and advanced Technology (IJEAT),December 2019,pp(135-138)

[14] [15]

[16] Plewis I Analyzing Indian farmer suicide rates, Proceedings of the National Academy of Sciences,2018 Jan 9;115(2):E117.

[17]Nishant,Potnuru Sai,Pinapa Sai Venkat,Bollu Lakshmi Avinash, and Jabber. Crop Yield Prediction based on Indian

Agriculture using Machine Learning. In 2020 International Conference for Emerging Technology (INCET),pp.1-4.IEEE,2020.

[18] Kale, Shivani S., and Preeti S.Patil. A Machine Learning Approach to Predict Crop Yield and Success Rate . In 2019 IEEE pune Section International Conference (PuneCon),pp.1-5.IEEE,2019.

[19] Kumar, Y.Jeevan Nagendra, V. Spandana, V.S. Vaishnavi,K.Neha, and V.Approach for Crop Yield Prediction in Agriculture Sector. In 2020 5th International Conference on Communication and Electronics Systems (ICCES),PP.736- 741.IEEE,2020

[20] Nigam, Aruvansh, Saksham Garg, Archit Agrawal, and Parul Agrawal. Crop yield Prediction using machine learning algorithms. In 2019 Fifth International Conference on Image Information Processing (ICIIP),pp.125-130.IEEE,2019.

[21] Bang, Shivam, RajatBishnoi, Ankit Singh Chauhan, Akshay Kumar Dixit, and indu Chawla. Fuzzy logic bades crop yield prediction using temperature and rainfall parameters predicted through ARMA,SARIMA, and ARMAX models . In 2019 Twelfth International Conference on Contemporry Computing (IC3),pp.1- 6.IEEE,2019.