uPeppe / fantabeto

Machine learning model for predicting Serie A players performance in a match, in terms of Fantacalcio (italian fantasy football) scores.
MIT License
36 stars 8 forks source link

Selecting team at the start of the season and preparing for the January market auction #2

Open AndreaCovelli opened 2 months ago

AndreaCovelli commented 2 months ago

I've read carefully the code and your article on Medium: it's really a great work, no doubts.

When reading about the implementation of the model I haven't understood two concepts:

  1. How to select the team at the start of the season: I've read your reply to a comment on medium and you stated that you've made the initial team by applying the prediction using as opposing team one made through averaging all the stats of Serie A teams. I didn't find this reference in the github code.

  2. In the Medium article you say that by using the algorithm to predict selecting a statistically average Serie A team as an opponent, it was useful in preparing for the January market auction: where is this implemented in the code?

I'm trying to understand all the parts of the model better, I hope I haven't inconvenienced you.

Thanks for your time.

uPeppe commented 2 months ago

Ciao!

  1. When making a prediction for a player, part of the features are the stats of the opponent team. In 6_neural_network_training_and_prediction a pred_avg_seriea excel file is generated, by using as opponent team a dummy one, or which the stats are obtained by simply averaging those of all the 20 Serie A teams.
  2. Basically the pipeline was run on January, using the approach above. If you mess with the Excel file you can order players based on their expected vote/fantavote. Filtering with only the players available for the auction in my league, this helped selecting what players to aim for. This not coded, but just an analysis based on the data generated by pipeline.
AndreaCovelli commented 2 months ago

Grazie @uPeppe.

If I've understood correctly, at the start of the season the initial team is chosen based on the output of _6_neural_network_training_andprediction.ipynb: is my statement correct? In regards to point 2 I guess the part about Filtering with only the players available for the auction in my league is done in Excel, right?

uPeppe commented 2 months ago

In both cases, it's like a manual analysis done on Excel, based on the pred_avg_seriea file generated

AndreaCovelli commented 2 months ago

@uPeppe Many thanks, I'm curious to see how this project will evolve over time, keep it up 💪

AndreaCovelli commented 1 month ago

@uPeppe a question: how is the file pred_matchday_base.xlsx generated? Because for numeric inputs I understand how it works but in the base case I can't figure out which data the python script is using. Grazie in anticipo ;)

uPeppe commented 1 month ago

Manually, it's just the excel template used for generating the pred_matchday sheets

AndreaCovelli commented 1 month ago

Ok but it uses data related to the first matchday of the current season, to the last matchday of the previous season or which one?

uPeppe commented 1 month ago

Doesn't matter what data it contains! It will be replaced by the script. Something you could manually replace is the "fantacalcio" sheet, which contains initial prices/roles for Fantacalcio, but if remember correctly it's just used for parsing the Mantra role of the players

AndreaCovelli commented 1 month ago

Ok, now which data can i use to forecast the best team for the start of the season considering that the league hasn't yet started?

uPeppe commented 1 month ago

I'd say:

The pipeline might be a bit hard to adapt for the new season initially, especially if FBRef changed anything in their website and scraping script doesn't work anymore

AndreaCovelli commented 1 month ago

@uPeppe If you could be interested, I'm trying to recreate the model of the paper at this link. I've written nearly all the python code but I can't figure out why the output it's slightly different from that of the paper. Maybe you've better knowledge than me in that field.

uPeppe commented 1 month ago

I don't have access to the article Maybe you can contact me in private about this

AndreaCovelli commented 1 month ago

@uPeppe Yeah, surely. How can i contact you?