# Modeling Soil Temperature with Fuzzy Logic and Supervised Learning Methods
## 3 Results
### Performance Evaluation of the MFIS Model  
The MFs and fuzzy inference rules were determined through a comprehensive analysis and interpretation of the relationships between soil temperature and air temperature data. In the fuzzy logic system, the air temperature and soil depth were employed as input variables, while the output variable was defined as the soil temperature at various depths. For the fuzzy sets, the input and output variable ranges were as follows: soil depth ranged from 5 to 100 cm, air temperature from \(-\)15 to 35 \({}^{\circ}\)C, and soil temperature from \(-\)5 to 35 \({}^{\circ}\)C. As a result of the data-driven analysis, a total of sixteen fuzzy rules were formulated to represent the underlying patterns and relationships in the dataset (Table 4). The corresponding fuzzy sets and MFs are illustrated in Figure 2. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Variable** & **Magnitude of** & **\(\boldsymbol{\mathit{SE}}\)** & **\(\boldsymbol{\mathit{t}}\) Value of** & **Possibility** \\  & **Coefficient** & **\(\boldsymbol{\mathit{SE}}\)** & **Coefficient** & **Possibility** \\ \hline Constant & \(-\)1.981 & 0.331 & \(-\)5.990 & \(<\)0.01 \\ Soil depth & 0.097 & 0.006 & 15.097 & \(<\)0.01 \\ Average temperature & 1.224 & 0.021 & 57.597 & \(<\)0.01 \\ Soil depth \(\times\) Average temperature & \(-\)0.007 & 0.000 & \(-\)16.558 & \(<\)0.01 \\ \hline Analysis of variance F = 1563.45 & & & & \(<\)0.01 \\ R\({}^{2}\) = 0.931, R\({}^{2}_{\text{adi}}\) = 0.930 & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of MLR for soil temperature Tokat, Türkiye. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Training** & & & **Testing** & \\ \hline
**MAE** & **RMSE** & **R\({}^{2}\)** & **MAE** & **RMSE** & **R\({}^{2}\)** \\ \hline
1.54 & 2.00 & 0.93 & 1.89 & 2.33 & 0.94 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Evaluation metrics of the MLR model on training and testing dataset. Five different defuzzification methods were employed to convert the fuzzy output of the model into a crisp value: centroid, Bisector, mean of maximum (MOM), largest of maximum (LOM), and smallest of maximum (SOM). The predictive performance of the fuzzy inference system was assessed using statistical metrics including MAE, RMSE, and R\({}^{2}\), applied to both training and testing datasets, as presented in Table 5. Among the methods evaluated, the centroid defuzzification approach yielded the most accurate results. Specifically, in the training dataset, the centroid method achieved an MAE of 2.58 \({}^{\circ}\)C, an RMSE of 3.29 \({}^{\circ}\)C, and an R\({}^{2}\) value of 0.83. In the testing dataset, the corresponding values were 2.83 \({}^{\circ}\)C for MAE, 3.45 \({}^{\circ}\)C for RMSE, and 0.85 for R\({}^{2}\), indicating strong generalization capability. By contrast, the remaining defuzzification methods demonstrated comparatively lower predictive accuracy, with the LOM method exhibiting the weakest performance, attaining an R\({}^{2}\) value of only 0.70 in the testing dataset. \begin{table}
\begin{tabular}{l c c c c} \hline \hline \multirow{2}{*}{**Depth (cm)**} & \multicolumn{4}{c}{**Average Air Temperature (\({}^{\circ}\)C)**} \\ \cline{2-5}  & **Very Low** & **Low** & **Moderate** & **High** \\ \hline Shallow & Very Low & Low & Moderate & High \\ Moderate & Very Low & Low & Moderate & High \\ Deep & Very Low & Low & Moderate & High \\ Very Deep & Very Low & Low & Moderate & High \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Rules for soil temperature (\({}^{\circ}\)C) at average air temperature (\({}^{\circ}\)C) and soil depth (cm). Figure 2: MFIS model setup: (**a**) depth (input); (**b**) air temperature (input); (**c**) soil temperature (output). The MFIS presents a viable approach for soil temperature prediction, primarily due to its high level of interpretability and adaptable framework. Nevertheless, in the context of this study, the MFIS model demonstrated inferior predictive performance when compared to the MLR model.