## 3 Handling Our Dataset
### Building Features for ML models
#### 3.2.3 Introduction of New Features  
To complement the features obtained through heatmaps and feature engineering, we introduce new features, such as _league_weight_, to further improve the performance of our model. This feature enhances our dataset by capturing the variability in player performance across leagues, allowing the model to make informed predictions within a broader competitive context. Moreover, the _league_weight_ feature is used to differentiate between leagues, which is essential for avoiding bias. It is important to account for varying levels of competition, quality, and popularity across leagues. Each league has a unique history of success in international tournaments like the UEFA Champions League, influencing its competitive standard [35]. Furthermore, the quality of leagues varies based on player skill levels and team performance, necessitating league-specific adjustments for more accurate insights. These adjustments are essential due to factors such as differing histories of success in international competitions like the UEFA Champions League and varying overall quality levels based on the caliber of players and teams [35]. Additionally, fan engagement and attendance rates \begin{table}
\begin{tabular}{l l l l} \hline \hline
**No** & **Field** & **Description** & **Correlation** & **Category** \\ \hline
1 & games & Total games played by the player. & 0.55 & Input \\
2 & timesplayed & Total minutes played by the player. & 0.58 & Input \\
3 & goals & Goals scored by the player. & 0.85 & Input \\
4 & xG & Total expected goals for a season. & 0.91 & Input \\
5 & assists & Total assists provided by the player. & 0.55 & Input \\
6 & xA & Expected assists for a season. & 0.54 & Input \\
7 & shots & Total shots taken by the player. & 0.80 & Input \\
8 & keypasses & Key passes leading to scoring chances. & 0.55 & Input \\
9 & yellowcards & Total yellow cards received. & 0.52 & Input \\
10 & redcards & Total red cards received. & 0.51 & Input \\
11 & npg & Non-penalty goals scored. & 0.83 & Input \\
12 & npgG & Non-penalty expected goals. & 0.90 & Input \\
13 & xGChain & Total xG from every possession involvement. & 0.65 & Input \\
14 & xGBuildup & Total xG from play buildup, excluding shots. & 0.53 & Input \\
15 & aGg & Actual goals per game. & 0.88 & Input and Target \\
16 & gpm & Goals per minute. & 0.54 & Input \\
17 & apg & Assists per game. & 0.55 & Input \\
18 & shpg & Shots per game. & 0.84 & Input \\
19 & shpm & Shots per minute. & 0.53 & Input \\
20 & kppg & Key passes per game. & 0.55 & Input \\
21 & kppm & Key passes per minute. & 0.52 & Input \\
22 & ypg & Yellow cards per game. & 0.51 & Input \\
23 & ypm & Yellow cards per minute. & 0.53 & Input \\
24 & rpg & Red cards per game. & 0.52 & Input \\
25 & rpm & Red cards per minute. & 0.51 & Input \\
26 & xGdiff & Difference between goals and xG. & 0.55 & Input \\
27 & xGg & xG per game. & 1.00 & Input and Target \\
28 & positionweight & Weight based on player’s position. & 0.55 & Input \\
29 & leagueweight & Weight based on the player’s league. & 0.55 & Input \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Details of extracted and engineered features of the Understat data. Features 1–14 are extracted using heatmap; features 15–27 are engineered; features 28–29 represent newly introduced features. Input denotes data from past seasons, while input and target indicate metrics that incorporate both past performance and predictive elements. can vary widely from league to league [36]. By applying different ratios to each league, we can adjust for these discrepancies, accurately reflecting each league's actual strength and unique characteristics. This differentiation enables fairer comparisons between players and teams, allowing our models to accommodate variations in league quality and other factors, ultimately leading to more precise and reliable soccer.