## 3 Materials and Methods
### Nutrient Concentration and Composition Prediction
#### 3.3.2 Nutrient Composition Concentration Prediction  
In the second approach, a model is developed based on different feature sets of the rice dataset, as shown in Table 6, based on solely the spatiotemporal factors.  
Referring to Table 6, the nutrient composition concentration prediction setting has been constructed by incorporating features from both spatiotemporal factors and nutrient features.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Parameter** & **Values** \\ \hline EN & alpha & 0.1 \\ PN & L1\({}_{\text{-}}\)ratio & 0.5 \\ SW & \
\begin{tabular}{c} Segre \\ \end{tabular} &
\begin{tabular}{c} 2 \\ \end{tabular} \\ PR & alpha & 0.1 \\ LS & alpha & 0.1 \\ LR & No additional parameters & \\ \hline \hline \end{tabular}
\end{table}
Table 5: Parameter specification for six regression algorithms of EN, PN, SW, PR, LS, and LR in single-nutrient concentration and composition concentration prediction.  
These settings will be utilized for nutrient composition concentration prediction using six methods: EN, PN, SW, PR, LS, and LR. The parameter specifications for these models in nutrient composition concentration prediction are consistent with those applied for single-nutrient concentration prediction (refer to Table 5).  
The steps outlined in Algorithm 2 illustrate the processes for nutrient composition concentration prediction, developed based on the similar parameter specifications listed in Table 4 for single-nutrient concentration prediction.  
```
Input: Nutrient concentration dataset Process:
1. Apply the Min-Max normalization method (Equation (1))
2. Set training ratio = 80%
3. Load FS6 from Table 6
4. ModelENs = Develop Elastic Net regression using FSx with parameters in Table 5
5. ModelSWs = Develop Polynomial regression using FSx with parameters in Table 5
6. ModelSWs = Develop Stepwise regression using FSx with parameters in Table 5
7. ModelER\({}_{\text{n}}\) = Develop Ridge regression using FSx with parameters in Table 5
8. ModelLS\({}_{\text{n}}\) = Develop Lasso regression using FSx with parameters in Table 5
9. ModelLR\({}_{\text{n}}\) = Develop Linear regression using FSx with parameters in Table 5 Output: ModelEN\({}_{\text{All}}\), ModelPN\({}_{\text{All}}\), ModelSW\({}_{\text{All}}\), ModelRR\({}_{\text{All}}\), ModelLS\({}_{\text{All}}\), ModelLR\({}_{\text{All}}\)
```  
**Algorithm 2** Nutrient composition concentration prediction  
Algorithm 2, designed for nutrient composition concentration prediction, starts by normalizing the input nutrient concentration dataset using the Min-Max method and setting an 80% training ratio. It then exclusively utilizes features from FS6 in Table 6 to develop six regression models--Elastic Net, Polynomial, Stepwise, Ridge, Lasso, and Linear--each configured with parameters specified in Table 5. The resulting output comprises comprehensive models denoted as ModelEN\({}_{\text{All}}\), ModelPN\({}_{\text{All}}\), ModelSW\({}_{\text{All}}\), ModelRR\({}_{\text{All}}\), ModelLS\({}_{\text{All}}\), and ModelLR\({}_{\text{All}}\). This algorithm provides an efficient means of predicting nutrient composition concentrations based on the designated features and regression techniques.