**3. Comprehensive machine learning models in agriculture**

Ml is a technology that aims to build an intelligent model that makes an accurate prediction without the intervention of human beings. The conventional machine learning approach depicted in **Figure 1**. It constructs various algorithms to make effective decisions in the problem domain. The primary step is to select the data on the problem under investigation and to select the parameters for the examination. The model is trained by a sample set of data (termed as training data) to gain experience in the environment and make the model fit. Later, the model evaluated using a sample set of data (termed as test data). So this is the primary step involved in any machine learning model, i.e., Train-Test-Predict. Usually, the data set was divided into two viz., training (70%) and testing (30%). Testing data is kept separate and not used in the preparation. The conventional machine learning approach depicted in **Figure 9**.

The dataset with many alternatives is collected and pre-processed using any normalisation or standardisation methods. The pre-processed data set was divided as train and test data set. The machine algorithms take the train data as input to train the model or to learn for the historical information. The trained model is evaluated with test data. The data visualisation tools are used for visualising the prediction or classification results. Algorithms involved in machine learning are supervised and unsupervised learning. In supervised learning, the model is trained with input data and mapped it into the known results whereas, in unsupervised learning, the model is trained, validated with input data and finds all type of unknown patterns.

The most familiar learning models that fall under these two categories are clustering, regression, classification, and dimensionality reduction. Machine learning utilises a secondary dataset (termed as validation data) for training the model further to avoid the overfitting of the model by the trained data. If the model generates more error on validation data, that means the model overfitted with the prepared data so that training stopped. Now the data split can be done like 60, 10, and 30 per cent of training, validation, and testing, respectively. Machine learning employed in almost all scientific applications such as health care, home automation, smart city, robotics, aquaculture, digital marketing, financial solutions, enterprises, climatology, food safety, agriculture, and more.

As Agriculture forms the major economy for most of the countries, better assistance speeding up each stage of agricultural crop production is mandatory. ML and the Internet of Things (IoT) serve this platform more effectively. IoT devices such as sensors, actuators through wireless communication protocols continuously monitor the crop, soil, water and communicate their health to remote devices either by message or log data or buzzer to alert the agriculturalist to take necessary actions. The data from these devices will make meaningful predictions and recommendations to the user exclusively farmers through machine learning algorithms.

Machine learning models trained by the historical data of the agricultural field through which it gains experience and makes wise decisions for the data signals received from the IoT devices. The data collected from these IoT devices must be secured and ensure confidentiality for accurate prediction results. Precision Agriculture is a strategy adopted to integrate heterogeneous information (Spatiotemporal data) for making precise and effective managerial decisions for global sustainable agricultural practices. Most of the parts of our country are adopting this strategy to improvise agrarian production in a brief span. Application of machine learning in precision agriculture has reshaped the plan such as field-based crop suggestion, fertiliser recommendation, water supply prediction, harvest prediction, thereby controlling the water usage by assisting the agriculturalists or farmers for better yield in a smart way.

Digital agriculture (a term coined by use of Precision Agriculture and Remote sensing) evolved to increase agricultural productivity with a minimised impact on environmental factors. Digital agriculture uses the data (crop, soil, and weather) sensed from the IoT devices to make effective decisions on nutrient demand-based fertiliser recommendation, water supply through proper irrigation, soil nourishment, pest or weed control, and crop protection from intruders. Digital agriculture focuses on the best-of-breed optimisation algorithms fro crop production and its protection during growth. Multi-cropping is a technique adopted in Digital agriculture or smart farming, which allows the cultivation of more than one crop in a single cultivable land.

Digital agriculture has to take more precautionary steps while feeding these different crops with weeds and fertilisers as the mixed plant has a different nutritional requirement and water supply. So it takes into account inter-variability and intravariability among the crops before feeding the fertilisers. It adopts the techniques like in-row treatment to spray fertiliser for each plant separately, sensor-equipped drones to track the weed, automated sensing of fertiliser details from the barcode label for a correct proportionate mix of pesticides, drift reduction techniques and integration of these applications with global positioning system and comprehensive information system for periodic relay to the agriculturalists.

The application of Machine learning in different stages of agricultural crop production are depicted in **Figure 10**. The necessary steps involved in crop cultivation are Land suitability analysis, appropriate crop selection, crop production, crop protection, nutrient supply, water supply, crop health monitoring (pest and weed control), human and animal attack detection, yield management, and post-harvesting.

Although these steps are common for all types of crops, soil nourishment value and chemical composition determine the techniques adopted in each level. Also,

**Figure 10.** *Machine learning approach.*

this paves a significant consideration of fertiliser supply when multi-cropping is selected. This multi-cropping technique has been in evolution decades back and done explicitly in the hill areas with meagre farming areas yielding better productivity.
