## 4 Results
### Random Forest  
1. The evaluation metrics for the Random Forest model were measured and presented based on its predictions for the validation set (Table 5).
2. A prediction graph was created to compare the model's results with the actual values of the test set (Figure 4).
3. The significance of the Random Forest model's features is depicted in Figure 5.
4. A Python code was also used to conduct a Random Forest analysis using the Apache Cassandra data through Apache Spark (Table A8) [34; 35; 36; 37; 38].  
Figure 4 shows the predictions of the Random Forest model compared to the actual fish mortality values. The red line represents the ideal fit, where predictions match the actual values perfectly. Each green 'x' marks a predicted value plotted against its corresponding true value. The proximity of these points to the red line suggests that the Random Forest model performs effectively, with most predictions closely aligning with the actual values.  
Figure 4: Random Forest predictions versus true values.  
When comparing this plot to the DT model, the Random Forest model's predictions are consistently closer to the red line, indicating better prediction accuracy. While there are still some deviations, particularly for the extreme mortality values, the overall performance of Random Forest is superior, showing fewer outliers and more accurate predictions across a wider range of values.  
Figure 5 illustrates the importance of different features in the Random Forest model's prediction of fish mortality. The size of each feature's bar indicates its relative contribution to the model's accuracy, with larger bars signifying a greater influence on mortality predictions. For example, MAB and SFR are the most important, suggesting that they play a significant role in forecasting, while other factors like DO and vol have comparatively smaller impacts.  
The Random Forest model has a lower MSE than the \(D\)Ts, indicating more accurate predictions. Its R\({}^{2}\) score shows that it can explain approximately 63% of the variance in target values, demonstrating a good predictive capacity. This makes the Random Forest model more reliable for forecasting target values in fish culture data.  
* The RMSE value is 64.21, indicating the average deviation of the predicted values from the actual values. While this value is still significant, it shows a moderate level of prediction error. A lower RMSE would indicate better accuracy (Table 5).
* The R\({}^{2}\) value is 0.63, suggesting that the model explains 63% of the variance in the data. While it is not perfect (with 1.0 being ideal), an R\({}^{2}\) of 0.63 indicates a decent fit, meaning that the model captures a good portion of the variability in the dataset (Table 5).
* The MSE value is 698.54, representing the average squared difference between the predicted and actual values. This lower MSE, compared to the previous scenario, indicates an improvement in the prediction accuracy, as a lower MSE reflects fewer errors in the predictions (Table 5).
* The C-index is 0.85, indicating a high level of ranking accuracy (Table 5).  
Figure 5: Random Forest-predicted factors affecting fish mortality.  
\begin{table}
\begin{tabular}{c c} \hline
**Variable** & **Coefficient Value** \\ \hline RMSE & 64.21 \\ R\({}^{2}\) & 0.63 \\ MSE & 698.54 \\ C-index & 0.85 \\ \hline \end{tabular}
\end{table}
Table 5: Random Forest results analysis.