1. Introduction
Agriculture serves as a fundamental pillar of global economies, playing a critical role in enhancing Gross Domestic Product (GDP) and ensuring food security on a global scale [
1]. However, agriculture is facing challenges to food security due to ongoing climate change and population growth, leading to potential food shortages. The relationship between food security and freshwater consumption efficiency in agriculture is becoming increasingly evident, especially with the growing dependency on irrigation practices. Agriculture remains the largest consumer of freshwater resources, utilizing approximately 70% of the global freshwater supply to irrigate about 25% of the world’s arable land [
2,
3]. According to Anon (2019), the global population is expected to reach 9.7 billion by 2050, and the demand for both nutrient-dense food and water resources will rise significantly, placing further pressure on agricultural systems [
4]. Food demand is expected to increase by 60% by 2050, necessitating more cultivated land and intensive production, which will further escalate water usage [
5,
6,
7]. Given the limited potential for agricultural land expansion, there is an imperative need for crop systems to optimize the utilization of available water and land resources to support the future population. Therefore, understanding and improving water use efficiency is paramount to achieving substantial water conservation and enhanced crop yields.
Smart irrigation technologies are considered the best method for saving water resources while ensuring that crops do not experience water deficiency. Smart irrigation refers to applying the right amount of water at the right time and place [
8]. When fruit trees experience water stress, they may exhibit various responses, such as a loss of turgor, reduced cell pressure, lowered root water potential, stomatal closure, decreased transpiration, crop water deficits, and root hardening, depending on the intensity and duration of the exposure. These factors can lead to decreased productivity and deteriorated fruit quality [
9,
10]. Consequently, research has increasingly focused on measuring crop stress—both directly and indirectly—due to changes in environmental factors like soil and weather, and incorporating these measurements into decision-making for crop irrigation [
11,
12]. Moving away from traditional water management practices based on experience or intuition, modern methods include real-time measurements of soil moisture content and tension, as well as meteorological information, such as air temperature, humidity, solar radiation, wind speed, and rainfall, to estimate crop evapotranspiration [
13]. Furthermore, the water consumption process in crops is influenced by complex nonlinear interactions involving environmental factors, soil, and crops. These dynamic, strongly coupled interactions make irrigation management more challenging. To analyze and predict these complex interaction factors, algorithms and prediction techniques for irrigation timing and volume based on artificial intelligence and machine learning have been developed.
Technologies that quantify soil moisture and crop water stress to determine optimal irrigation timing are being introduced. Canopy temperature measured using infrared thermometry has been recognized as a non-invasive reliable indicator of a plant’s water status [
14,
15,
16]. Various canopy temperature-based indices have been introduced, with the Crop Water Stress Index (CWSI) being one of the most extensively applied indicators for assessing plant water stress [
17]. The CWSI has been applied across various crops and agricultural climates for stress detection, irrigation scheduling, and yield forecasting [
18,
19,
20,
21]. The CWSI is scaled between 0 and 1, where a value of 0 represents optimal irrigation conditions with no water stress, and a value of 1 denotes extreme water stress or the cessation of transpiration. The CWSI can be derived through both theoretical and empirical methodologies. The theoretical model, grounded in the energy balance approach, was initially proposed by Jackson et al. (1981) [
22]. Although this theoretical approach yields precise estimates of CWSI, it demands an extensive set of input parameters, particularly aerodynamic resistance and net radiation values (as indicated in Equations (1)–(3)).
where dT represents the difference between leaf temperature and air temperature (°C); dT
u refers to the difference between leaf temperature and air temperature (°C) when no transpiration occurs due to water stress; dT
l is the difference between leaf temperature and air temperature (°C) when there is no water stress due to sufficient irrigation; R
n is the net radiation energy (W/m
2); S is the slope of the saturation vapor pressure curve (kPa/°C); K is the psychrometric constant (kPa/°C); r
a is the aerodynamic resistance (s/m); Y is the air density (kg/m
3); C
p is the specific heat capacity (1013 J/kg·°C); VPD is the vapor pressure deficit (kPa); and G is the soil heat flux (W/m
2). The empirical approach (Idso et al., 1981) is relatively easy to use and provides a reliable estimate of CWSI [
23]. Both approaches take into account the leaf temperature under well-watered conditions and the leaf temperature under non-transpiring conditions. Therefore, the most critical factor when using the CWSI is the accurate measurement of canopy temperature. Traditional methods measure leaf temperature using infrared thermometers and thermal imaging cameras. However, this method requires adjustments for sensor positioning due to the shadow effects caused by tree shape and canopy structure, and the growth of the trees necessitates multiple temperature sensors, involving significant effort and cost for installation and maintenance. When using fixed sensors, it is challenging to accurately measure leaf temperature due to the influence of shadows and the sensor’s direction, which may result in measuring the temperature of elements other than the leaf. In this study, to ensure the accurate calculation of the CWSI, a machine learning model was developed to predict leaf temperature based on environmental data rather than relying on sensors. This approach aims to improve the accuracy of CWSI estimation by predicting leaf temperature without the need for physical sensors.
2. Material and Methods
In this study, the target crop is peach, and the cultivar is
Prunus persica (L.)
Batsch (Cheonjeongdobaekdo). The data collection site is the peach experimental field of the National Institute of Horticultural and Herbal Science, located at a latitude of 35°49′29″ and a longitude of 127°01′32″ (
Figure 1). For the development of the leaf temperature prediction model, data collected at 1-min intervals from June to September in 2020, 2021, and 2022, including leaf temperature, relative humidity, air temperature, solar radiation, wind speed, and soil moisture tension, were utilized. Leaf temperature was measured using an infrared temperature sensor (SI-431, Apogee, Logan, UT, USA), and soil moisture tension was measured with a soil moisture tension meter (TEROS-21, METER Group, Pullman, WA, USA). An automatic weather station (AWS) was installed in the orchard to collect atmospheric environmental data using sensors for air temperature and humidity (KSH-7310, Korea Digital, Seoul, Republic of Korea), solar radiation (SWSR-7500, Korea Digital, Republic of Korea), and wind speed (SWAP-7300, Korea Digital, Republic of Korea), with data collected at 1-min intervals. The specifications of the sensors are listed in
Table 1.
The missing values in the time-series data for each variable were initially visualized and subsequently excluded. Outliers were detected and removed using the Interquartile Range (IQR) method, whereby air temperature, relative humidity, and solar radiation values that exceeded the upper quartile or fell below the lower quartile were classified as outliers and excluded from the dataset. The total number of data points after preprocessing was 307,924 for each variable. To select the training data for model development, a Pearson correlation analysis (bivariate correlation coefficient) was performed using SPSS Statistics 29.0. The correlation coefficient ranges from −1.0 to 1.0, with a higher absolute value indicating a stronger correlation. Various machine learning algorithms have been used in the agricultural sector for predicting crop growth and physiological characteristics. To propose a machine learning-based crop recommendation system suitable for the agricultural environment, the efficiency of nine unique machine learning models, including Logistic Regression (LR), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Decision Tree (DT), Random Forest (RF), Bagging (BG), AdaBoost (AB), Gradient Boosting (GB), and Extra Trees (ET), was evaluated [
24]. Lwandile et al. trained machine learning models using historical datasets that included temperature, rainfall, humidity, soil pH, and nutrient levels [
25]. Among the models, the Random Forest model achieved the highest accuracy, with a score of 99.31%. The model was used to predict crop height on winter wheat farms by leveraging soil data and spectral indices. Patil et al. applied various models, such as Random Forest (RF), Naive Bayes, Decision Tree, Logistic Regression, and K-Nearest Neighbors (KNN), for crop and yield prediction. Among the models used for yield prediction, Random Forest regression demonstrated the best performance, with a Mean Absolute Error (MAE) of 0.64 and an R
2 score of 0.96. For crop prediction, the Naive Bayes classifier produced the most accurate results, with an accuracy of 99.39% [
26]. Such research efforts in measuring agricultural environments are actively being conducted.
Machine learning was conducted using the regression program of MATLAB
® R2023a’s Statistics and Machine Learning Toolbox
TM. The regression learning models used were linear regression, Decision Tree, Support Vector Machine (SVM), Gaussian Process Regression (GPR), and Decision Tree ensemble. The models were evaluated based on Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), R
2 (coefficient of determination), and Mean Squared Error (MSE) (
Table 2). RMSE represents the square root of the average squared difference between predicted and actual values, indicating the magnitude of the error. MAE is the average of the absolute differences between predicted and actual values, while MSE is the mean of the squared differences between actual and predicted values. Additionally, R
2 represents the explanatory power of the model. The three best-performing machine learning algorithms were selected, and Python 3.11 was used to implement representative models of these algorithms. The models were evaluated using MAE, RMSE, MSE, and R
2 to assess their performance. The processing for the development of the leaf temperature prediction model is shown in
Table 3.
3. Results and Discussion
Table 4 presents the results of the Pearson correlation analysis (bivariate correlation coefficient) conducted using SPSS Statistics 29.0 for leaf temperature, air temperature, wind speed, soil moisture tension, relative humidity, and solar radiation. According to the correlation analysis, correlations in the range from 0.60 to 0.80 at the
p-value level of 0.01 are considered significant. The relationship between leaf temperature and air temperature showed a significant positive correlation of 0.928 (
p < 0.01). Solar radiation (0.661) and relative humidity (–0.645) also exhibited significant correlations, while wind speed (0.081) and soil moisture tension (0.077) had very low correlations with leaf temperature, and thus, they were excluded from the model operation.
Table 5 shows the results of running the machine learning model for predicting peach leaf temperature using MATLAB. The MRMR (Minimum Redundancy Maximum Relevance) algorithm assigned importance scores of 1.9766 for air temperature, 0.7311 for solar radiation, and 0.5187 for relative humidity. Among the machine learning algorithms, ensemble, medium tree, coarse tree, Gaussian regression, and linear regression models demonstrated a superior performance. The ensemble model achieved an RMSE of 0.46628, an MSE of 0.21742, and an MAE of 0.29036. The medium tree regression model exhibited RMSE, MSE, and MAE values of 0.50625, 0.25629, and 0.32045, respectively, while the coarse tree, Gaussian, and linear regression models showed values of 0.51006, 0.26017, 0.32942, 0.53133, 0.28232, 0.36252, 0.65458, 0.42848, and 0.45197, respectively. Most models had RMSE values between 0.2 and 0.6, suggesting they were able to accurately predict the data. Moreover, the coefficient of determination (R
2) for the prediction models was greater than 0.98, indicating a high performance.
In general, machine learning algorithms are classified into two primary types: supervised learning and unsupervised learning models. Supervised learning is more commonly used and is generally easier to implement than unsupervised learning. Supervised learning algorithms are trained on a labeled data training set to make predictions or decisions. This approach is used when the user knows the answer to the problem and trains the AI to find that answer. There are two main types of supervised learning algorithms: classification and regression. Classification methods ask the algorithm to predict anomalies in order to classify input data into specific categories, while linear regression deals with continuous data. Supervised learning is more widely employed due to its relative ease of implementation when compared to unsupervised learning techniques. Supervised learning can be divided into classification and regression, where classification predicts a class when the dependent variable is categorical. In contrast, regression predicts a continuous dependent variable using predictor features, and instead of predicting a class, it quantifies the probability of belonging to a class. One of the most popular methods in classification is ensemble learning, which can be divided into Bagging and Boosting. Bagging involves randomly selecting multiple samples, training each model, and aggregating the results for prediction or classification. Boosting, on the other hand, combines weak models to create a stronger model that performs better [
27]. Random Forest is a representative example of Bagging, while Gradient Boosting, XGBoost, and Light GBM are examples of Boosting. GBM is a predictive model that can be used for both regression and classification analyses.
Based on previous studies and references, the Decision Tree, Random Forest, and Gradient Boosting were selected, and each model was evaluated using RMSE (Root Mean Squared Error), MAE (Mean Absolute Error), MSE (Mean Squared Error), and R2 (coefficient of determination). For the peach leaf temperature prediction, 30% of the dataset was used as a test set, while the remaining 70% was used as a training set. This approach allowed the model to be trained using 70% of the total data and tested with the remaining 30% (for example, 70 data points out of 100 would be used as the training set, and 30 data points as the test set). This ratio has been proven through various studies and experiments to generally provide a good performance. Additionally, after selecting the models, hyper-parameters were fine-tuned, and graphs comparing actual and predicted values were generated. Box plots were also created to visualize the distribution of predicted and actual values.
The processes of model implementation and evaluation are depicted in
Figure 2,
Figure 3 and
Figure 4. Decision Tree is characterized by their hierarchical structure, where internal nodes represent features (attributes), branches define decision rules, and terminal nodes (leaf nodes) correspond to predicted outcomes [
28]. Decision Trees are highly interpretable models that can handle both numerical and categorical data without the need for extensive preprocessing or feature scaling, making them versatile for various types of data. However, they are prone to overfitting when dealing with noisy data, and biased trees can be generated when certain classes dominate. Random Forest is an ensemble learning technique consisting of multiple Decision Trees. Each tree is trained on a randomly sampled subset of the data (using bagging) and a random subset of features. By averaging the outputs of multiple trees, Random Forest reduces the risk of overfitting, resulting in improved robustness and higher accuracy compared to individual Decision Trees. It can handle high-dimensional datasets but is harder to interpret than a single Decision Tree, and using a large number of trees can be computationally expensive [
29]. Gradient Boosting builds an ensemble of trees sequentially, where each new tree is added to correct the errors of the previous tree. New trees are fitted to the residual errors of the previous trees using gradient descent to minimize the loss function. When properly tuned, Gradient Boosting often outperforms Random Forest, can handle a wide range of data types, and offers flexibility in selecting loss functions. However, it is more complex than Random Forest, prone to overfitting if not tuned properly, and more computationally expensive [
30]. Many studies have been conducted using ensemble algorithms to detect crop water stress through multispectral and image data. Wu et al. used Random Forest for analysis to estimate water stress in rice crops and achieved high accuracy [
31]. Additionally, Kapari et al. proposed a method to detect water stress in maize crops using multispectral and thermal images collected by UAVs in conjunction with machine learning algorithms [
32].
Performance evaluation showed that the Gradient Boosting model had the lowest RMSE of 0.88, an R
2 of 0.97, an MAE of 0.54, and an MSE of 0.77, indicating that it was the most suitable model for predicting leaf temperature. The Random Forest (RF) and Decision Tree (DT) models followed in performance. The performance of the peach leaf temperature prediction models is shown in
Table 6.
The Light GBM (Gradient Boosting Machine) is a high-performance framework developed by Microsoft, designed to operate efficiently on large datasets. Although it follows the same basic principles as traditional GBM, Light GBM is optimized for faster and more efficient training on large datasets [
33]. Therefore, an additional evaluation of the performance of the GBM and Light GBM was conducted. The Light GBM for peach achieved an RMSE of 0.91, an R
2 of 0.96, and an MAE of 0.58, which were slightly lower than the results of the Gradient Boosting model. As more data are collected over time, the potential for Light GBM’s use in big data applications will be considered.
Hyper-parameter tuning is a critical process for optimizing machine learning model performance and preventing overfitting. In large datasets and complex models, the impact of hyper-parameters is significant, making appropriate tuning essential. Among the model’s hyper-parameters, the learning rate determines how quickly the model learns during training, the maximum depth (max depth) helps reduce overfitting, the minimum number of samples (min samples leaf, min samples split) controls overfitting, and the number of estimators (n estimators) determines the number of Decision Trees used. Random search selects random combinations of hyper-parameters within a defined range for testing. It is faster than grid search but may have a lower probability of finding the optimal combination. Grid search systematically considers all combinations of predefined hyper-parameters, but it is time-consuming. In this study, random search was used to derive hyper-parameters, where random combinations were selected within the defined range to find the best. After the random search, a grid search was employed for more precise hyper-parameter optimization. The optimal hyper-parameters for the peach are shown in
Table 7.
The actual leaf temperature measurements from June to September in 2020 and 2022 were compared with the predicted values obtained from the prediction model.
Figure 5,
Figure 6,
Figure 7 and
Figure 8 show a monthly comparison graph for 2020. While there was a maximum difference of 1.5 °C, the model exhibited satisfactory performance. In 2022, the actual and predicted values were found to be almost identical (
Figure 9,
Figure 10,
Figure 11 and
Figure 12). The GBM demonstrated high accuracy in predicting actual leaf temperature data, with similar patterns across monthly data. However, errors in some intervals could be attributed to model limitations or data variability.
Box plots are useful tools for visually representing data distribution and key statistics. Through the box plot analysis, the distribution between predicted and actual values was examined. The median near 0 °C indicates that prediction errors were not significantly skewed toward either positive or negative values. The green triangle, representing the mean, is also located near 0 °C, showing that the prediction errors were generally balanced. This confirms that the GBM model had relatively small prediction errors and made stable predictions (
Figure 13).