Search code examples
pythonprediction

How to select 11 best players from a list of players?


I have scraped the ODI data of players from espncricinfo.com. the sample data looks like this. I have also scraped the match results, see sample data.

I would like to select the best/most favorable 11 players from playing team. Like if the match is between India and England, the best 11 players from both teams, out of 22 players. How can I do that? What should be the target variable if I want to train the data?


Solution

  • Well, If I got your idea correctly, you have a bunch of players and want to rank them based on their performance numbers, right? So, I'd suggest to you an algorithm called TOPSIS. It's a very easy method to rank based on score numbers, which is your case.

    In a brief, you need to organize your data in a matrix of alternatives and criteria. Then, the algorithm will try to find the best alternatives (in your case, the players) based on the give criteria (the performance numbers). In the end, the method will rank all the alternatives and you can get the first 11 to achieve your goal.

    I used this method in the past and I have it implemented it in Python. Feel free to get it from my GitHub.