## 4 Results
### Predicting Goals and Assists
#### 4.2.1 Model Performance Assessment  
Residual analysis involves examining the differences between the observed values and those predicted by the model. It helps identify any systematic deviations from the expected predictions, which can indicate model inadequacies. The residual analysis for the Decision Tree, Random Forest, Gradient Boosting, and Ridge Regression models reveals a consistent pattern across all models (Figures 3-6).  
Figure 2: Correlation matrices. **Note**. Age: Player’s age; MP: Matches Played; Starts: Number of matches started; Min: Total minutes played; 90s: Number of full 90-min matches played; Gls_Ast: Combined total of goals and assists.  
Figure 4: Residual plot: Random Forest.  
Figure 5: Residual plot: Gradient Boosting.  
Figure 3: Residual plot: Decision Tree.  
Figure 6: Residual plot: Ridge Regression.  
Training and Testing Assessment  
For lower predicted values, each model demonstrates a high level of accuracy, indicated by residuals closely scattered around the zero line. Specifically, this accurate prediction range is observed up to a predicted value of 5 for the Decision Tree model and Ridge Regression model and 4 for the Random Forest model and Gradient Boosting model. Within these ranges, the residuals indicate that the model effectively captures the underlying trends in the data, suggesting that the predictions are accurate. However, as predicted values increase, outliers and deviations from the zero line become more prevalent, and the variance of residuals fluctuates. Despite the absence of discernible patterns, these observations suggest that model performance may be affected when making predictions beyond certain thresholds. Their learning curves are shown in Figures 7-10.  
* **Decision Tree versus Random Forests**: The Random Forest Regressor demonstrates superior initial performance, evidenced by its lower RMSE in both the training and testing sets, suggesting that it is a more effective model straight away when compared to the Decision Tree Regressor. Its smaller discrepancy between training and cross-validation RMSEs signals a reduced tendency toward overfitting, an advantage over the Decision Tree. For both models, adding more data improves the model's performance, but the rate of improvement slows down, which is typical as a model starts to reach its performance limit with the given features and model complexity. Notably, the Random Forest Regressor shows less variability in its testing RMSE, which is illustrated by a narrower confidence interval, indicating a more consistent performance regardless of the training set it encountered.
* **Gradient Boosting versus Ridge Regression**: The Gradient Boosting model has a considerable and continuous gap between training and testing RMSE. The training RMSE drops significantly at first, demonstrating the model's ability to fit the training data effectively. However, the testing RMSE improves more slowly, constantly remaining higher than the training RMSE. This difference indicates overfitting, as the model struggles to generalize to new data. The Ridge Regression learning curve, on the other hand, begins with a significant gap between training and testing RMSE. The gap narrows dramatically as training progresses, and the two RMSE curves converge. The training RMSE gradually rises while the testing RMSE falls, indicating better generalization. Ridge Regression finds a better balance between fitting the training data and generalizing to new data based on this behavior. While the RMSE values are not the lowest among the models, the model's ability to resist overfitting is a significant benefit.  
In conclusion, the learning curves emphasize the trade-offs between model complexity and generalization. Random Forest and Gradient Boosting models provide a more balanced approach, whereas Decision Tree and Ridge Regression models struggle with overfitting. Fine-tuning and optimization efforts may be required to improve the generalization capabilities of the latter models.