Connect with us

Analysis

Using Machine Learning to predict Barcelona’s 2021/22 league season

Published

on

Photo via Imago

Johan Cruyff famously said, “I’ve never seen a bag of money score a goal.” It is indisputable that money is not the only deciding factor behind a football club’s success. Time and time again, we have seen that football is chaotic and absurd. Anything can happen.

That being said, it is evident that statistically, the clubs with more money are usually the more successful ones. While one cannot predict the unpredictability that is engraved within football, an outcome that is statistically probable can be predicted. This article will explore the relationship between the points a club accumulates in a league season and the total value of the club’s squad. Then, Python will be used to build a linear regression model in order to predict the number of points Barcelona will obtain in the 21/22 season based on the club’s hypothetical squad.

Let us begin with visualizing the relationship between the total league points obtained by a club and the club’s total squad value. Since the amount of money spent on transfers has increased tremendously over the course of the last decade, in this article, only seasons 2014/15 – 2019/20 will be considered. Upon plotting the total points against the total squad value, it is evident that there is a positive correlation between the two. Granted, the correlation is not extremely strong, but it exists nonetheless.

.

A line of regression has been generated. The line’s gradient is approximately 0.05138986, and its y-intercept is approximately 44.5470726. There is only one dependant variable in question, club value/total value of squad, and so our line of regression can be modelled by the equation:

P = (0.05138986 )V + 44.5470726 where P is the points and V is the total squad value.


club_values = np.array(df['Values']).reshape(89,1)
club_points = np.array(df['Point']).reshape(89,1)

from sklearn.linear_model import LinearRegression
linear_model = LinearRegression()
linear_model.fit(club_values,club_points)

In order to predict the points accumulated based on Barcelona’s squad value next season, the squad value won’t directly be inputted into our equation above. The coefficient and the y-intercept have been rounded up after a certain number of decimal places, and so, to preserve the precision of the prediction, Python’s LinearRegression predict method will be utilized.

Now comes another challenging part of coming up with Barcelona’s hypothetical squad next season. Based on reports, it can be assumed that Samuel Umtiti, Miralem Pjanic, Martin Braithwaite and Phillipe Coutinho will be some of the notable players to leave. To compensate for the outgoing players, it can be assumed that Barcelona will sign Eric Garcia, David Alaba, Georginio Wijnaldum and Memphis Depay. Here is a table that contains all the players in Barcelona’s hypothetical 21/22 squad and their corresponding market values:

PLAYER NAME MARKET VALUE (MILLION POUNDS)
MARC ANDRE TER STEGEN79.34
ARNAU TENAS1.59
RONALD ARAUJO26.45
CLEMENT LENGLET26.45
GERARD PIQUE12.70
DAVID ALABA58.19
ERIC GARCIA21.16
OSCAR MINGUENZA10.58
JORDI ALBA26.45
JUNIOR FIRPO10.58
SERGINO DEST26.45
SERGI ROBERTO26.45
SERGIO BUSQUETS10.58
FRENKIE DE JONG84.63
RIQUI PUIG19.04
ILAIX MORIBA10.58
PEDRI GONZALEZ74.06
GEORGINIO WIJNALDUM37.03
ANSU FATI84.63
KONRAD DE LA FUENTE2.64
OUSMANE DEMBELE52.90
TRINCAO26.45
MEMPHIS DEPAY47.61
ANTOINE GRIEZMANN54.00
LIONEL MESSI84.63
Figures via Transfermarkt

The club’s total value comes up to be £786.60 million. It is important to note that a player’s value is volatile. Transfermarkt updates player values every few months, and so it is extremely probable that this squad’s market value will be drastically different next season.

It is also important to understand that Transfermarkt’s market values are not official and so they are not always an accurate representation of a player’s true market value. Moreover, a player’s value is not always an accurate representation of their quality. Age is a key factor in determining market value, and so while a young player might have a high market value indicating that they are a bright prospect for the future, they might not necessarily be an excellent player at the time when the value is assigned.

Now that all of this has been established, the only thing left is making the prediction.

The machine learning model predicts that Barcelona will obtain 85 points in the 21/22 La Liga season. In the 19/20 season, Real Madrid won the league with 87 points, and in the 18/19 season, Barcelona won the league with 87 points as well. The difference between the points accumulated by the last two winning La Liga squads and the predicted points that Barcelona’s 21/22 squad will obtain is a mere 2 points. This shows that it is possible for Barcelona to win the league next season.

Since the correlation between the two variables, as observed from the data from the last 6 seasons, is not even close to being extremely strong, Barcelona’s 21/22 league points tally may be drastically different from what was predicted by the machine learning model. However, at the end of the day, the model can only work with the data it is exposed to.

Erling Haaland can change the course of Barcelona’s season. It would take forever to make predictions based on Barcelona’s hypothetical squads that include all of the club’s potential transfer targets, however, due to Haaland’s influence, an exception can be made for him. Laporta’s interest in signing Haaland has been widely reported.

However, he will cost a fortune this summer, and with Barcelona’s debt situation, it is unlikely that the Catalan club will pursue him in the upcoming transfer window. That being said like mentioned previously in the article, football is chaotic, and anything can happen.

Oh, Haaland. Oh, you. (Photo via Imago)

Assuming that Barcelona does end up signing Haaland in the summer, Antoine Griezmann will most definitely have to leave (due to wages and the money that can be generated from his sale). Haaland’s current value is £99 million, and so Barcelona’s total squad value for next season, after being corrected for Griezmann’s exit and Haaland’s arrival is £831.60 million.

Haaland’s addition can put 21/22 Barcelona on level with the previous two Spanish champions in terms of total points won. The difference in points between a squad containing Haaland and one not containing him is only two. However, an argument about whether signing Haaland is worth it, is not in the scope of this article.

“Transition seasons do not exist at Barcelona.”

Joan Laporta | Presidential campaign

A club of Barcelona’s stature will always compete for titles. The machine learning model shows that Barcelona is in contention for the 2021/22 La Liga title. Ronald Koeman has done a splendid job at the Blaugrana club this season, and there is no logical reason for him to not do an even better job next season after getting fresh players in the summer.

While football at its core is unpredictable, statistically, it would not hurt to trust Barcelona to win the 2021/22 La Liga title.

My name is Malhar. I've been watching Barcelona ever since I saw Barca's Spanish players dismantle opponents for fun in the 2010 World Cup. Over the years, my love for Barcelona has evolved into a passion to write about Barcelona. I love writing about the club. I usually have very unpopular opinions, but I'm proud of them and I stand by them. Feel free to discuss about anything related to football, with me!