## 4 Experimental Setting
### The Performance of the Nutrient Composition Concentration Approach  
ModelPNAll appears to be the best-performing model based on R2, MAE, and RMSE. It explains a significant proportion of variability and provides accurate predictions. ModelRRAll and ModelLRAll have the same R2, MAE, and RMSE values, indicating similar performance. They both exhibit a moderate level of explained variability and reasonable predictive accuracy. ModelENAll, ModelESWAll, and ModelLSAll have lower R2 values, suggesting limited ability to explain variability. They also have higher MAE and RMSE values, indicating higher prediction errors compared to the better-performing models. The choice of features included in the models can significantly impact performance. Models that incorporate irrelevant or highly correlated features may exhibit lower accuracy. The results (Table 12) also indicate that the features incorporated have a complex relationship with each other and the target variable. The experiment results led us to the conclusion that regression models have good performance in informing nutrient co-existence, concentration, and composition. This insight allows interventions to increase nutrient recovery to optimize the crop's yield. PN generally outperformed the other tested algorithms in terms of producing higher R2 values and lower MAE and RMSE values for almost all models. This is due to the ability of the polynomial function to capture nonlinear relationships among variables. However, it should be noted that for Mg, the Polynomial Regression algorithm produced a negative R2 value, indicating that it explained less variance in the dependent variable than a horizontal line. Therefore, the polynomial function was not well suited for predicting nutrient content in Mg. In contrast, LR produced better performance compared to the other methods for Mg, signifying that this model was better approximated by a straight-line relationship. This finding highlights the significance of considering the specific nature of the data and the relationships between variables when selecting the most appropriate regression model for nutrient prediction. Figure 9 illustrates the Streamlit outputs for the prediction of nutrient composition concentrations, based on the best-performing model, PN. Referring to the Figure 9 interface for nutrient composition concentrations, similar to the single-nutrient prediction (see Figures 4-8), the application furnishes crucial values for \"predicted\", \"Best practice (Range)\", \"Best practice (Average)\" and \"Intervention\". The predicted values for each nutrient are calculated employing the PN model, considering spatial-temporal parameters and other pertinent nutrient inputs. The \"Best practice Range\" and \"Best practice Average\" values delineate the optimum range and averages of nutrient concentrations, providing valuable benchmarks for nutrient levels. Furthermore, this information serves as a comprehensive intervention preparation  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **R2 Score** & **MAE** & **RMSE** \\ \hline ModelENAll & 0.0771 & 0.1814 & 0.2376 \\ ModelPNAll & **0.5237** & **0.1211** & **0.1502** \\ ModelESWAll & 0.0450 & 0.2054 & 0.2572 \\ ModelRRAll & 0.3066 & 0.1477 & 0.1949 \\ ModelLSAll & 0.0377 & 0.1918 & 0.249  
tool by informing farmers or scientists about the anticipated nutrient concentration. The projected value, in turn, facilitates the digital twin system in suggesting the appropriate amount of nutrient recovery, aligning with established best practices. So, the provided streamlit for rice nutrient's composition concentrations' prediction serves as a powerful intervention preparation tool. By informing farmers and scientists about the anticipated nutrient concentrations, this approach enables the digital twin system to suggest the precise amount of nutrient recovery aligned with best practices. This proactive and informed approach not only optimizes crop yields but also minimizes the environmental footprint associated with excessive fertilizer application.