Connect with us


Finding a replacement for Gerard Pique using Machine Learning



Photo by Eric Alonso/Getty Images

Barça Universal uses a machine-learning algorithm to find five players from within the La Liga who can act as the replacement to Gerard Pique, taking over the centre-back berth for Barcelona.

Club legend, Gerard Pique joined FC Barcelona in 2008 and has been a starter for nearly 12 years. While the Spaniard’s defensive ability and intelligence has not faltered, age, being the cruel mistress it is, is catching up with him. Now 33, Pique is not the physical demon he used to be, and so his exit from Catalonia shortly seems inevitable, and the burden to find a replacement falls on Barcelona.

Players come, and players go. Having won everything in a Blaugrana shirt, Pique will leave with his head held high. His exit won’t be a tragedy, however, failing to find a suitable replacement, will. Matthijs de Ligt and/or Eric Garcia seem like the two options destined to be Pique’s successors.

However, recent years have shown that the transfer market is extremely unpredictable, and it would be imprudent not to consider more players who can act as a replacement to Pique. These are players Barcelona can target in the net three transfer windows, and secure their transfer before someone else comes calling.

K Means Clustering

K Means Clustering is an unsupervised machine learning algorithm. As the name suggests, it creates ‘clusters’ of data points that share similar characteristics. The algorithm splits a data set into K number of clusters.

Initially, K number of centroids (a centroid is a data point at the centre of a cluster) are chosen. These centroids are data points in the data set and are picked at random. The centroids are used to train a ‘classifier’ that classifies data sets, which produces a randomized set of clusters. Following that, each centroid is set to the arithmetic mean of the data points in its cluster. This process keeps on repeating till the values of the centroids stabilize.

The final centroids then classify data points from the data set into clusters. In this case, the data points refer to the defenders in La Liga.

K means Clustering Pique replacement

The Data

The data that will be used in this article will be Per 90 statistics for defenders in the 2020/21 La Liga season (so far). The defence, along with Pique have not been in top form this season, and so we will be using Pique’s 2018/19 league season as the standard to find a replacement. All of the data is from

Here is a list of the metrics that will be used:

  1. Tkl: Number of players tackled
  2. TklW: Number of tackles won
  3. Def 3rd: Tackles in the defensive third
  4. Mid 3rd: Tackles in the middle third
  5. Att 3rd: Tackles in the attacking third
  6. Tkl (D): Number of dribblers tackled
  7. Att (D): Number of dribbles contested
  8. Tkl% (D): Percentage of dribblers tackled
  9. Past (D): Number of times dribbled past
  10. Press: Pressures
  11. Succ (Press): Successful pressures
  12. % (Press): Successful pressures percentage
  13. Def 3rd (Press): Pressures in the defensive third
  14. Mid 3rd (Press): Pressures in the middle third
  15. Att 3rd (Press): Pressures in the attacking third
  16. Blocks: Number of blocks
  17. Sh: Number of times blocking a shot
  18. ShSv: Number of times blocking a shot that was on target
  19. Pass (B): Number of times blocking a pass
  20. Int: Interceptions
  21. Tkl + Int: Number of players tackled plus interceptions
  22. Clr: Clearances
  23. Err: Errors (mistakes leading to an opponent’s shot)


After developing and applying the K means Clustering algorithm, there were five players closest to Pique according to the cluster, and can be his replacement. These are the five players who are most similar to Gerard Pique:

  • Mouctar Diakhaby
  • Unai Núñez
  • Joaquín Fernández
  • Joseph Aidoo
  • Jules Koundé

A broad analysis

Mouctar Diakhaby

Age: 23
Nationality: French
Current Team: Valencia

Mouctar Diakhaby pique replacement

If not anything else, Barcelona fans can be assured that Diakhaby will give his 100% every game. (Photo by Manuel Queimadelos Alonso/Getty Images)

Mouctar Diakhaby is a French professional who plays for Valencia CF in La Liga. In September 2016, Diakhaby made his professional debut for Olympique Lyonnais against Bordeaux, as a 19-year-old. Two years later, in the summer of 2018, Diakhaby sealed a move to Valencia.

The Frenchman mirrors Pique’s playstyle. He likes to play short passes, which falls in line with Barcelona’s philosophy of building from the back. Additionally, he does not dive into tackles but rather prioritizes getting his positioning right.

Today’s game is more physical than ever. Diakhaby stands tall at 6’4 as a result of which he can win headers easily. His height and physique also make him a danger in the opposition’s box. In fact, The Frenchman scored 3 goals in the Europa League in the 2016/17 season.

With Valencia’s current financial state, Barcelona can snatch Diakhaby for quite a modest fee, making him a low-risk, high-reward prospect.

Unai Núñez

Age: 23
Nationality: Spanish
Current Team: Athletic Bilbao

Unai Nunez Real Madrid

There is little doubt over Nuñez’s abilities, but he needs to find more consistent footing. (Photo by Juan Manuel Serrano Arce/Getty Images)

Unai Núñez has been touted to become Spain’s next great centre-back, succeeding the likes of Gerard Pique and Sergio Ramos. In August 2017, Núñez made his debut for Bilbao against Getafe CF in a 0-0 draw, becoming a regular starter in his debut season (reminiscent of Pique in the 2008/09 season).

Núñez stands tall at 6’2, however, his technical abilities are his greatest strength. The Spaniard has all the makings of a great ball-playing centre-back. He likes to dribble, carrying the ball out of the defensive third himself.

Núñez can also make great line-breaking, long passes that can directly contribute to goals; a quality possessed by his predecessors Gerard Pique and Rafael Marquez. Additionally, Núñez can be a candidate for the future captain of the club, due to his composure and concentration. The lack of focus in the defence in recent years has led to results such as 0-4 at Anfield and 2-8 in Lisbon.

In recent weeks, Nuñez has been forced to the bench by Yeray Alvarez, but that does not remotely echo of the potential he possesses, and his importance with Athletic Bilbao.

The young Spaniard has been scouted by many European giants such as Manchester City and Bayern Munich. Núñez’s €30 million release clause makes him both a bargain in today’s market and yet another situation where the pros are expected to outweigh the cons heavily.

Joaquín Fernández

Age: 24
Nationality: Spanish
Current Team: Real Vallodolid

Joaquin Fernandez pique replacement

Fernandez (#24) celebrates his goal against Deportivo Alaves. (Photo by Gonzalo Arroyo Moreno/Getty Images)

Joaquín Fernández, is a Spanish footballer who plays for Real Vallodolid. The youngster is a versatile player who can be deployed as either a centre-back or as a defensive midfielder.

Fernández is the current captain of Vallodolid, which, at 24, is a testament to his brilliant leadership skills. At 6’3, he is an imposing figure in and near either penalty area, and often aerial duels against him go uncontested. Additionally, Fernández is capable of making long passes into the attacking third.

While the Spaniard is not as rated as Núñez or Diakhaby, he is still a player who can contribute to the team, and due to his low market price, he is an excellent value for money.

Joseph Aidoo

Age: 25
Current Team: Celta Vigo

Joseph Aidoo pique replacement

Aidoo is the glue holding the otherwise frail Vigo defence. (Photo by Octavio Passos/Getty Images)

Joseph Aidoo is a Ghanian professional football player who plays as centre-back for Spanish side Celta Vigo. In the summer of 2019, Aidoo sealed a move to Celta from KRC Genk for a reported €8 million. He made his debut in a 1-0 home win against Valencia.

Aidoo, being only 6 feet, is not great at eliminating aerial threats. However, he is an excellent tackler of the ball and is great at intercepting passes on the ground. Additionally, the Ghanian has the potential to become the perfect ball-playing centre-back. He likes to play short passes, which helps build from the back and boasts of excellent close control and technical finesse. To top it off, he is visibly faster than Pique ever was.

Aidoo’s defensive abilities make him an option worth exploring, especially if Barcelona want to contain the plethora of counter attacks they face game after game when the opposition cuts past their midfield.

Jules Koundé

Age: 21
Nationality: French
Current Team: Sevilla FC

French centre-back Jules Koundé has a great claim for being the best young centre-back in the world. In the summer of 2019, Koundé moved to Sevilla for a reported 25 million euro transfer fee. The youngster has done nothing but impress since his transfer. Koundé ended his debut season as a European champion after winning the UEFA Europa Cup with Sevilla and was named in the Squad of the Season for the competition.

As a regular starter in the 20/21 season, Koundé has been dominant. He was flawless at the Camp Nou against Barcelona and was also great against Bayern Munich in the UEFA Super Cup where he ensured that Robert Lewandowski had a quiet game; for the most part anyway.

Jules kounde Barcelona

Kounde was inarguably the best player on the pitch in the Sevilla-Barcelona tussle. (Photo by LLUIS GENE / AFP)

The Frenchman possesses excellent defensive and technical prowess. He is a superb passer of the ball, making him an ideal ball-playing centre-back. He likes to make short passes which helps the team build from the back and maintain possession.

Moreover, Koundé does not dive into tackles, rather, he prefers to stay on his feet and ensure that his positioning is perfect. In spite of being just 6 feet, the youngster is commanding in the air, courtesy of his dominating leap. Additionally, Koundé is quick and sharp, he can recover the ball when the opposing team is counter-attacking.

The Frenchman could quite possibly become the best centre-back in the world in a few years and quality like that comes with a price. Sevilla would take their time, and can easily fethc upwards of €65 million for the 21-year-old.

Sevilla reportedly rejected Manchester City’s offer of €55 million + Nicolas Otamendi in the summer transfer window. It is no news that Zinedine Zidane is quite fond of the youngster, and was interested in signing him last season. A move to arch-rivals would be a huge blow for Barcelona, who, as reported by Mundo Deportivo are keeping tabs on Koundé and could make a move for him in the future.


All 5 potential replacements have their strengths and weaknesses. Statistics do not always portray the full picture, and finding a replacement for a player with the calibre of Pique will require extensive research and scouting.

Moreover, there are great options outside of Spain such as Matthijs de Ligt, who has the potential to lead Barcelona’s backline. However, everything considered, as it stands, due to his talent, it would appear that Jules Koundé is the best possible replacement for Gerard Pique.

Trending Articles