# Modeling Soil Temperature with Fuzzy Logic and Supervised Learning Methods
## 3 Results
### Comparative Evaluation of Prediction Models for Soil Temperature  
The comparative scatterplots of the predicted versus measured soil temperatures for each model are illustrated in Figure 3, providing a visual representation of the prediction accuracy across models.  
The ANFIS model was developed using Trimf (4 \(\times\) 4) along with a linear output function. The model demonstrated excellent performance, achieving an MAE of 1.35 \({}^{\circ}\)C, an RMSE of 1.88 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.94 on the training dataset. On the testing dataset, the model's performance remained strong, with an MAE of 1.46 \({}^{\circ}\)C, an RMSE of 1.89 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.95. These results highlight the ANFIS model's high learning capacity and generalization ability, making it a statistically robust approach for soil temperature prediction.  
By contrast, the MFIS, while providing significant advantages in terms of model interpretability, exhibited relatively lower accuracy. It yielded higher error values, with an MAE of 2.58 \({}^{\circ}\)C, an RMSE of 3.29 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.83 on the training dataset. The performance on the testing data was similarly suboptimal, with an MAE of 2.83 \({}^{\circ}\)C, an RMSE of 3.45 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.85. These results suggest that, while the MFIS is useful for interpretable models, it is less effective in predictive accuracy compared to the ANFIS.  
Among the machine learning algorithms, XGB and RF distinguished themselves with their low error rates and high R\({}^{2}\) values. In particular, XGB achieved the lowest error values, with an MAE of 1.06 \({}^{\circ}\)C and an RMSE of 1.43 \({}^{\circ}\)C on the training dataset, while also demonstrating the highest explanatory power, with an R\({}^{2}\) of 0.97. The model maintained its strong performance on the testing dataset, achieving an MAE of 1.82 \({}^{\circ}\)C, an RMSE of 2.30 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.92. RF produced consistent and well-balanced results across both training and testing datasets. On the other hand, methods such as SVR, KNN, and MLP exhibited moderate success, with relatively higher error rates compared to XGB and RF.  
The MLR model exhibited an average performance on the training dataset, with an MAE of 1.54 \({}^{\circ}\)C, an RMSE of 2.00 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.93. Although its performance on the testing dataset was relatively comparable to some machine learning methods, achieving an MAE of 1.89 \({}^{\circ}\)C, an RMSE of 2.33 \({}^{\circ}\)C, and an R\({}^{2}\) of 0.94, it failed to effectively capture the complex relationships present in the data due to its inherently linear structure. Despite  
Figure 3: Comparison of soil temperature prediction with scatter plots using fuzzy logic, machine learning, and MLR models (black dots represent training data, while red dots indicate testing data).  
the seemingly high R\({}^{2}\) value on the testing set, the limitations of the linear model become particularly evident in the deeper layers, where the nonlinearity of the soil temperature dynamics becomes more pronounced.